Skip to content

fix(gui): guide native login switching and manual retry - #6581

Merged
lidge-jun merged 5 commits into
lidge-jun:devfrom
luvs01:fix/native-switch-guidance-6387-20261004
Oct 5, 2026
Merged

lidge-jun merged 5 commits into
lidge-jun:devfrom
luvs01:fix/native-switch-guidance-6387-20261004

Conversation

@luvs01

@luvs01 luvs01 commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

After a blocked native-login switch the panel showed a generic failure and a diagnostic code, and the close → confirm → check → reopen sequence was buried in one paragraph. This PR gives each step and each failure a concrete next action.

  • The confirmation lists three numbered steps that match the controls below them: close native Codex on the server computer for the displayed CODEX_HOME, select the checkbox and confirm, then wait for the result and reopen.
  • Every allowlisted error code maps to its own guidance (Codex still running, process check unavailable, requests still running, another operation running, login or key-store verification, storage, recovery, confirmed rollback). Raw server messages never render. A missing response is still described as unconfirmed, never as a rollback.
  • Every error adds a manual retry hint: refresh the status, review the active profile, and to retry a login change select the action again and confirm Codex is closed. Nothing retries automatically.
  • After the existing readback and account refresh, the last outcome shows under Last confirmed result with reopen guidance, withheld during another confirmation, an error or a failed refresh.
  • Error and result notices use a native-main-notice class (.notice.native-main-notice:not([hidden]) { display: block; }) instead of inline styles. All 11 locales and the native main profiles guide are updated.

Completes the remaining UI-guidance scope of #6387 (the German layout was fixed by #6388). No change to session/request logic, credentials, process inspection, confirmation requirements, management authentication, recovery transactions or Pool selection.

Maintainer refresh (lane B1): merged current dev (37189ca3) into the branch and tightened the copy after review (removed "home above", "stopped acknowledgement" and lock/ownership internals; made the retry hint conditional because the same notice covers profile-save failures), replaced the inline styles with the class, and updated the guide and existing tests. Original implementation by @luvs01.

Verification

No local tests were run, per the repository owner's instruction for this round; test evidence is hosted CI at the exact head.

Static checks run at 4c7031124a08917805cb516e6ed15bee306d318a, all exit 0: bun run typecheck, bun run privacy:scan, bun run structure:check, bun scripts/file-size-ratchet.ts, bun run lint:gui, (cd gui && bun run lint:i18n), (cd gui && bun run build), git diff --check. The native-main catalog has 52 keys in English and in each of ko, de, fr, zh, zh-TW, ru, ja, tr, vi and pt. styles.css is 2953 lines (cap 2958).

Existing tests were updated (no new test files): exact English guidance, step → checkbox → confirm DOM order, retry hint and class for CODEX_BUSY, NATIVE_PROFILE_BUSY, PROFILE_STORAGE_UNSAFE and NETWORK_ERROR, and the notice cascade (the class beats .notice-warn; the rule keeps its :not([hidden]) guard).

Rendered with the real NativeMainProfilesView and production CSS in a sandboxed Vite harness (temporary HOME/OPENCODEX_HOME/CODEX_HOME, synthetic profiles and paths, no network), captured with headless Chromium; no console errors and no external requests. No real login switch, installed client or proxy was exercised.

Exact-head CI: Cross-platform CI 37323315993 completed success on attempt 1 for 4c7031124a08917805cb516e6ed15bee306d318a (pull_request event): changes, gates, all four Linux test shards, storage policy, API usage, docs site build, Docker smoke, keyring (Ubuntu/Windows), npm-global (Ubuntu/Windows) and the final ci aggregate succeeded. The structure gate, standalone privacy job, Windows/macOS matrices, macOS control/widget, setup action, remote helper and desktop shell were skipped by the change filter and are not counted as executed coverage (structure and privacy were run locally above; privacy also runs inside gates). React Doctor and CodeRabbit passed on this head. The branch has no file overlap with dev changes merged since (#6638, #6626).

English, light — confirmation steps, CODEX_BUSY with manual retry, and the last confirmed restart result:

Confirmation, busy error and last confirmed result

German, dark, keyboard focus on the checkbox:

German dark confirmation with focus

Korean: another operation running, unsafe storage, lost response · English at 390px

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. Copy, a CSS class and tests only; server messages stay out of the view and authentication, credential and process boundaries are unchanged.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f0627db6-178a-4828-93b4-1540cc9df4d9
📥 Commits

Reviewing files that changed from the base of the PR and between 7b45534 and 4c70311.

📒 Files selected for processing (7)
  • docs-site/src/content/docs/guides/native-main-profiles.md
  • gui/src/components/native-main-profiles-view.tsx
  • gui/src/i18n/native-main-translations.ts
  • gui/src/styles.css
  • gui/tests/native-main-confirmation-layout.test.tsx
  • gui/tests/native-main-guidance.test.tsx
  • gui/tests/native-main-translations.test.ts
 ________________________________________________________________________
< Obi-Wan Kenobi has taught me well. I sense a disturbance in your code. >
 ------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1e0eebdf-0654-45e8-973b-e0460f578b9a
📥 Commits

Reviewing files that changed from the base of the PR and between e53c807 and 7b45534.

📒 Files selected for processing (5)
  • docs-site/src/content/docs/guides/native-main-profiles.md
  • gui/src/components/native-main-profiles-view.tsx
  • gui/src/i18n/native-main-error-copy.ts
  • gui/src/i18n/native-main-translations.ts
  • gui/tests/native-main-guidance.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The native profile switch interface now shows translated confirmation steps, error guidance, and conditional result notices. Tests cover confirmation, refresh, retry, and error cases. The guide documents the switch sequence and the meaning of confirmed results.

Changes

Native profile switch guidance

Layer / File(s) Summary
Confirmation, results, and error guidance
gui/src/components/native-main-profiles-view.tsx, gui/src/i18n/native-main-error-copy.ts, gui/src/i18n/native-main-translations.ts, gui/tests/native-main-guidance.test.tsx, docs-site/src/content/docs/guides/native-main-profiles.md
The view displays translated confirmation steps and conditional result guidance. An exhaustive error-code map supplies translated error copy across 11 locales. Tests cover refresh timing, lost responses, retry behavior, and distinct error guidance. The guide documents confirmation, refresh, and last-confirmed-result behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 7b455

The guidance does not automatically retry a switch or offer an actionable switch while the credential store is unsupported. No actionable merge-blocking issue remains after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed [#6387] The reviewed NativeMainProfilesView in gui/src/components/native-main-profiles-view.tsx presents the close, confirm, and result sequence. Its confirmation wraps the home path and heading a…
Out of Scope Changes check ✅ Passed All summarized changes support [#6387]. The view and translation changes implement the requested workflow and error guidance. The tests verify those behaviors. The native-profile guide documents the s…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the GUI guidance for native-login switching and manual retries, which is the main change.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 4, 2026
@Ingwannu

Ingwannu commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Scoped intake at b3eab8289c5c3b87f09c5392f533bb558055ccd8, base a6bc60816cc1b51c4279defa41c7ff2d2370d47e; not final UI or merge approval. I inspected the five-file inventory and the view/error-copy changes. The public-code map is exhaustive over the existing error union; raw server messages are not newly rendered. Refresh stays read-only, retry still needs a new explicit action/acknowledgement, and reopen guidance is withheld during busy/error/confirmation or failed readback. The retained result is labelled last confirmed rather than presented as proof of a later uncertain mutation. No backend session or credential-mutator file changed.

I independently checked hosted run 37208718967: successful at this exact head, all four Linux test shards and gates job 111455345129 passed, including GUI tests/lint/typecheck/build. React Doctor also passed. Your local suite counts, browser flows/geometry and pristine non-isolated comparison remain author evidence; I did not rerun them or operate a real account/native app. Skipped native-platform jobs and the disclosed unchanged narrow manager-row overflow are not validated/fixed here.

Keep Draft and complete the repository's head-bound readiness checklist when ready for owner/maintainer review. Please keep #6387 open until its remaining scope is accepted and actually lands; green CI does not close an issue. Final copy/visual/platform acceptance remains with the owner. No new scan, sponsorship waiver, approval, integration or deployment was supplied.

@luvs01
luvs01 marked this pull request as ready for review October 5, 2026 02:03

@Ingwannu Ingwannu left a comment •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase/readiness checkpoint at 7b455346431c8f0f242e61bde7c452b238292cd7, base dev e53c8077e40b6f540bf1e5d5791a55282466bfac.

The head is a normal merge of the earlier b3eab828 source head and current dev. All five PR-owned guidance/doc/test files are byte-identical to b3eab828; the large older-head-relative GUI delta comes from integrated dev, not a new guidance implementation. I did not repeat the earlier author-reported GUI/browser tests or independently certify their geometry/native-login results.

Verification still names b3eab828 and its older successful CI as the source HEAD. Please add this published head/base, preserve those results as historical receipts, and link the completed current-head checks when available. Cross-platform CI 37253418151 and React Doctor 37253418180 are pending; the previous head's green status does not validate the merged tree. Keep Draft, owner UI review and the installed/native acceptance limits separate. This is a source-identity/readiness check only, not approval of the mounted component or authentication behavior; no real account switch, new scan or local test was performed.

Author-response checkpoint — 2026-10-05 02:50 UTC intake: I read comment 5987247586 and the updated current-tree Verification. It now names 7b455346431c8f0f242e61bde7c452b238292cd7 / base e53c8077, labels older receipts historical, and separately reports 2,909 isolated GUI passes, 46 focused passes, typecheck, lint and build. This addresses the description/source-identity request; those are author results, not my executions or UI certification. Current-head React Doctor 37253881075 has succeeded; the initial React run 37253418180 was cancelled, and Cross-platform CI 37253418151 is currently in progress, not passing. Draft is restored. Owner UI review and installed/native acceptance remain separate conditions. No component/geometry security review, new scan, local test, approval or merge was performed.

@luvs01
luvs01 marked this pull request as draft October 5, 2026 02:28
@luvs01

luvs01 commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

Addressed the source-identity/readiness checkpoint in the description for 7b455346431c8f0f242e61bde7c452b238292cd7 (base e53c8077e40b6f540bf1e5d5791a55282466bfac). The normal two-parent integration preserves the five PR-owned file blobs; older receipts are explicitly historical.

Current-tree local validation is recorded separately: full isolated GUI suite 2,909 pass, focused checks 46 pass, root typecheck, GUI lint/build and dev-relative whitespace checks pass. These are author checks, not owner UI approval or installed/native acceptance. I restored Draft to respect the review's Keep Draft condition.

Current-head Cross-platform CI has now completed successfully: 16 jobs succeeded and 9 were skipped, including success of all four Linux test shards and the final aggregate. React Doctor also passed on this same head. The description records the exact skipped scope; installed/native acceptance and owner UI review remain separate, so Draft is retained. No workflow was cancelled, restarted or dispatched for this update.

Tighten the confirmation steps and recovery copy so each line names a
concrete action: close native Codex on the server computer, select the
checkbox, confirm, then reopen. Error copy drops lock and ownership
internals while keeping the rule that a missing response is not a
rollback, and the retry hint reads as conditional because the same
notice covers profile-save failures. The error and result notices use a
native-main-notice class instead of inline display styles. All locales,
the guide and existing native-main tests are updated.
… styling

happy-dom ships no [hidden] display rule, so a hidden div still computes
as block once :not([hidden]) stops matching. Assert the stylesheet guard
that lets the browser's hidden rule win instead.
@lidge-jun
lidge-jun marked this pull request as ready for review October 5, 2026 15:10
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration (lidge-jun, dev only) — 2026-10-05 bug triage round 2, lane B1.

@lidge-jun
lidge-jun merged commit c566bb5 into lidge-jun:dev Oct 5, 2026
38 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants