Skip to content

feat(gui): add confirmed 99% main-account protection controls - #3560

Merged
lidge-jun merged 4 commits into
devfrom
codex/main-account-99-settings
Sep 5, 2026
Merged

feat(gui): add confirmed 99% main-account protection controls#3560
lidge-jun merged 4 commits into
devfrom
codex/main-account-99-settings

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add the main-account 99% protection switch beside Ultra Fast in Codex settings, with an enable confirmation and truthful Luna Reserve consequences.
  • Surface blocked/unknown/monitoring status outside Advanced settings, provide a direct Manage action, and keep the switch enabled after a fresh zero reset.
  • Use one proxy-scoped account controller; late saves from a previous proxy cannot replace the current account state. Separate save failure from successful-save/status-reload failure, and preserve keyboard focus and responsive layouts.
  • Update all nine UI locales and English/Korean account documentation.

Stack (merge bottom-up): #3552 runtime policy (merged) -> this UI layer -> #3578 explicit Reserve compatibility. This layer now targets dev after the parent squash. Review this layer only.

Verification

  • Final head fe9ed3b1b5c122cc0258fa85b077d6776aea0ab2 passed exact-head CI, attempt1, all selected platform jobs and governing PR checks. Authorized admin squash landed as a53775103e764e6644d41ec47d2e3e753e9f4613 at2026-09-05T06:04:13Z; freshly fetched dev ancestry is verified. All four UI commits remained unchanged in the final rebase and integrated screenshots remain representative. No local suites or deployment.

  • GUI build, i18n lint and GUI lint passed. Documentation build passed (425 pages). Privacy scan and diff check passed.

  • Native in-app browser QA used real components plus an isolated fixture API: cancel/Escape with zero writes, confirmed save, 99% block, zero unlock while enabled, failed read/save, saved-but-status-refresh-failed recovery without duplicate PUT, same-page Manage, and Tab/Shift-Tab boundaries.

  • Korean at 390/768/1280 CSS pixels and English at 390/1280 inspected. All screenshot data is synthetic; no live account or installed app setting changed. Preview processes and browser overrides were cleaned up.

  • Independent source review passed after fixing the stale-proxy completion race. New regression tests are authored for CI. No local test suites were run, per owner instruction; push uses --no-verify. Exact-head CI remains required before merge.

Integrated Codex settings switch

Integrated mobile main-account controls

Mobile confirmation

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.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 30983b21-9983-4e4a-8d44-2d39bed35a62

📥 Commits

Reviewing files that changed from the base of the PR and between 9fe986d and fe9ed3b.

⛔ Files ignored due to path filters (11)
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/en-confirm-desktop.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/en-confirm-mobile.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-blocked-desktop.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-confirm-desktop.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-confirm-mobile.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-confirm-tablet.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-main-card-integrated-desktop.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-main-card-integrated-mobile.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-setting-desktop.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-setting-integrated-desktop.jpg is excluded by !**/*.jpg
  • devlog/_plan/260905_main_quota_guard/022_ui_evidence/ko-zero-unlocked-desktop.jpg is excluded by !**/*.jpg
📒 Files selected for processing (27)
  • devlog/_plan/260905_main_quota_guard/000_plan.md
  • devlog/_plan/260905_main_quota_guard/021_settings_dispatch.md
  • devlog/_plan/260905_main_quota_guard/023_ui_review.md
  • devlog/_plan/260905_main_quota_guard/024_ui_verification.md
  • devlog/_plan/260905_main_quota_guard/025_focus_review.md
  • devlog/_plan/260905_main_quota_guard/026_ui_dev_integration.md
  • devlog/_plan/260905_main_quota_guard/030_reserve_compatibility.md
  • devlog/_plan/260905_main_quota_guard/040_delivery.md
  • docs-site/src/content/docs/ko/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/reference/cli/providers-accounts.md
  • gui/src/components/CodexAccountPool.tsx
  • gui/src/components/MainAccountHardLockSetting.tsx
  • gui/src/components/codex-account-pool-main-card.tsx
  • gui/src/hooks/useCodexAccountPool.ts
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/fr.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/codex-set-multiauth.tsx
  • gui/src/styles-codex-set.css
  • gui/tests/main-account-hard-lock-focus.test.tsx
  • gui/tests/main-account-hard-lock-setting.test.tsx

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 Sep 5, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Sep 5, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 58 / 80

이 PR은 메인 계정 99% 보호의 GUI 레이어입니다. 런타임 정책은 부모 #3552(codex/main-account-99-hard-lock, base=dev)에 있고, 이 PR base는 그 브랜치(codex/main-account-99-settingscodex/main-account-99-hard-lock)입니다. 지금 checkout dev HEAD(4dde2db97)에는 codexMainAccountHardLock/mainAccountHardLock UI·타입이 아직 없습니다. 그래서 이 diff만 보면 Advanced 설정에 Ultra Fast 옆에 토글·확인 다이얼로그를 두고, 켜기 전에 Luna Reserve가 막힐 수 있다는 문구를 보여주고, 메인 카드에 blocked/unknown/monitoring 상태를 띄운 뒤 Manage로 Advanced 안 설정으로 포커스를 옮깁니다. gui/src/pages/codex-set-multiauth.tsxapiBase마다 CodexSetMultiauthForProxy로 키를 갈라 하나의 pool controller를 쓰고, 이전 프록시에서 늦게 끝난 save가 새 프록시 상태를 덮지 못하게 ownerMountedRef로 콜백을 막습니다. 저장 실패와 “저장은 됐는데 계정 상태 새로고침 실패”를 나누고, 확인 모달은 Tab 순환·Escape·취소 시 쓰기 없음을 테스트로 잡았습니다. 9개 UI locale과 en/ko 계정 문서도 같이 갑니다. 단독으로 dev에 머지하면 안 됩니다 — 먼저 #3552(런타임)가 들어가야 설정 API·상태 필드가 살아 있습니다.

gui/src/components/MainAccountHardLockSetting.tsx - PUT 응답에서 ok === true와 snapshot shape를 같이 검사하는 건 좋다. 다만 save 실패 시 setLoadError(true)까지 켜서 토글이 비활성화되는데, “저장만 실패·읽기는 유효”인 경우와 UX가 섞일 수 있다. saveError와 loadError 분기를 카드 피드백에서 이미 나누니, 토글 disable 조건도 save-only일 때는 읽기 성공 snapshot을 유지하는 편이 더 명확하다.

gui/src/components/MainAccountHardLockSetting.tsx refreshMain - onSaved 예외를 삼키고 refreshError만 세우는 설계는 “PUT 성공 ≠ 카드 갱신 실패”를 지키려는 의도다. 중복 PUT을 막는 회귀 테스트가 있으면(본문 주장) CI에서 그 케이스를 꼭 돌리자. 로컬 스위트는 돌리지 않았고 push는 --no-verify라고 적혀 있다.

gui/src/pages/codex-set-multiauth.tsx - proxy-scoped controller + hasMainHardLockSetting로 Manage를 같은 페이지 Advanced로 여는 연결은 맞다. Providers 임베디드 경로에 이 설정이 없으면 main-card가 hash로 codex-set로 보내는 fallback이 있다.

gui/src/components/codex-account-pool-main-card.tsx - hardLocked일 때 active 배지·스위치 버튼을 숨기는 건 런타임 차단과 UI가 맞게 보인다. policy.enabled인데 state가 unknown/ready인 모니터링 문구도 i18n 키와 맞다.

gui/tests/main-account-hard-lock-setting.test.tsx - happy-dom + 확인/취소/포커스/프록시 교체 시나리오가 많다. exact-head CI가 머지 게이트라는 본문 조건을 그대로 따르자.

#3552 - 이 UI PR의 부모다. UI만 먼저 넣으면 설정 키가 서버에 없다.

메인테이너의 판단이 필요한 지점

너의 추천
#3552가 dev에 들어간 뒤 이 PR을 리타깃·CI 그린 확인 후 머지한다. 단독 머지 금지. types/config 스플릿에 무효화될 PR은 아니다. Reserve 호환 후속은 별도 PR로 두라는 스택 설명을 따른다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun marked this pull request as ready for review September 5, 2026 01:06
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 5, 2026 01:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T01:09:47.787933Z c79ddb2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c79ddb2373

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread gui/src/components/MainAccountHardLockSetting.tsx
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-settings branch from c79ddb2 to 080878d Compare September 5, 2026 01:43
@lidge-jun

Copy link
Copy Markdown
Owner Author

Head 080878d now has all exact-head checks green. The disable-focus finding and subsequent delayed-poll focus-steal countercase are fixed, independently re-reviewed, and manually verified with isolated browser fixtures. Parent #3552 is also green; the third Reserve layer is undergoing final catalog re-review before publication.

@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.

Approved for the isolated GUI layer at exact head 080878d5df5ad17a696ba7bf4e11c82a35341489.

The setting remains server-authoritative, does not guess during load/save uncertainty, separates acknowledged PUT success from account-status refresh failure, prevents stale proxy completions from replacing the current controller, and preserves keyboard focus without stealing it after deliberate departure. I found no new React waterfall, unstable data subscription, or render-time derived-state issue in this layer.

Local isolated GUI validation: 1,390 pass / 0 fail; GUI lint, i18n lint, and production build all pass. Exact-head hosted CI is green.

Landing conditions: this PR targets the parent stack branch rather than dev, so it must not merge as-is. Also, parent #3552 has two newly confirmed policy-input blockers on its current head despite green CI (out-of-range >100 evidence is clamped into a block, and non-monthly tertiary-only usage can become governing monthly policy). After #3552 is repaired and landed, retarget/rebase this GUI layer onto current dev and require fresh exact-head CI. Per the GUI/text policy, final landing remains owner-controlled.

@lidge-jun
lidge-jun force-pushed the codex/main-account-99-settings branch 2 times, most recently from a7a0ab8 to b3539dd Compare September 5, 2026 02:40
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-hard-lock branch from 473934e to 03ee2f1 Compare September 5, 2026 03:45
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-settings branch from b3539dd to 363573d Compare September 5, 2026 03:56
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-hard-lock branch from 03ee2f1 to 75dfbad Compare September 5, 2026 04:12
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-settings branch from 363573d to 54fb45a Compare September 5, 2026 04:13
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-hard-lock branch from 75dfbad to d48b322 Compare September 5, 2026 04:37
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-settings branch from 54fb45a to 2ebe76d Compare September 5, 2026 04:37
@lidge-jun
lidge-jun requested a review from Ingwannu September 5, 2026 04:38
Base automatically changed from codex/main-account-99-hard-lock to dev September 5, 2026 05:24
@lidge-jun
lidge-jun force-pushed the codex/main-account-99-settings branch from 2ebe76d to fe9ed3b Compare September 5, 2026 05:25
@lidge-jun
lidge-jun merged commit a537751 into dev Sep 5, 2026
29 of 30 checks passed
@lidge-jun
lidge-jun deleted the codex/main-account-99-settings branch September 5, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants