Skip to content

fix(integrations): make the Codex dashboard toggle truthful (carry of #3407) - #3556

Closed
lidge-jun wants to merge 5 commits into
codex/3464-launchd-stable-launcherfrom
codex/3406-codex-toggle-truth
Closed

fix(integrations): make the Codex dashboard toggle truthful (carry of #3407)#3556
lidge-jun wants to merge 5 commits into
codex/3464-launchd-stable-launcherfrom
codex/3406-codex-toggle-truth

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Disabling Codex from the Integrations overview opened the Grok Build consequence dialog, the status API handed that dialog OpenCodex's own config path instead of Codex's effective $CODEX_HOME/config.toml, and the Codex card kept its pre-toggle state until a full page reload because the routing resource was never refreshed after the mutation (#3406).

  • gui/src/pages/integrations/IntegrationsOverview.tsx: Codex-specific consequence copy (integrations.dialog.codex.*, six keys added to every locale: en/de/fr/ja/ko/ru/tr/zh/zh-TW); the desired switch state (toggleOn) now drives both the switch and its accessible label; refreshNativeDetails also refreshes codexResource after a Codex mutation so the badge follows observed routing immediately.
  • gui/src/pages/integrations/overview-clients.ts: codexRow takes the native status row — the switch shows desired state, the badge stays derived from observed routingInjected, and togglePath / toggleBlocked come from the native payload (unsettled native read → unknown; settled-but-missing → no toggle).
  • src/server/management/native-integration-routes.ts: codexStatus reports join(getCodexHome(), "config.toml"); Claude keeps getConfigPath().
  • Docs: guides/codex-integration.md desired-switch vs observed-badge paragraph.

Carries #3407 (author @turin-dev) onto the current stack head as a clean merge, so the original commits stay in history; the only change on top is a realpathSync on the test fixture (macOS /var vs /private/var). Co-authored-by trailer is in the merge commit.

Security note (MAINTAINERS.md): management-API surface change limited to the reported path string for the Codex client; no auth gate, credential, or write-path change.

GUI screenshot (Codex-specific disable dialog naming the effective config file):

Codex disable dialog

Stack (260905 bug triage, position 5 of 5; base is #3554's head — retarget to dev after the parents land):

# PR Layer Base
1 #3547 #3467 Google location classification dev
2 #3551 #3462 Mihomo IPv6 fake-ip discovery #3547
3 #3554 #3464 launchd stable launcher #3551
4 #3542 #3522 spill write health — merged
5 this #3406 truthful Codex toggle #3554

Unit: devlog/_plan/260905_bug_triage_stack/ (000, 005, 050).

Verification

  • bun run typecheck — exit 0.
  • bun test tests/codex-integration/native-codex-toggle.test.ts — 7 pass / 0 fail (the effective-path assertion failed before the realpath fix on macOS; passes after).
  • cd gui && bun test tests/integrations-overview-rows.test.ts tests/overview-state-merge.test.ts tests/integrations-surfaces.test.tsx — 51 pass / 0 fail.
  • bun run lint:gui, cd gui && bun run lint:i18n, cd gui && bun run build — clean.
  • bun run privacy:scan — passed.
  • Hosted CI on the exact head is the acceptance gate (no repository-wide local suite was run by maintainer instruction).

Closes #3406

Checklist

turin-dev and others added 4 commits September 4, 2026 08:49
…3407)

Disabling Codex from the Integrations overview opened the Grok Build consequence
dialog, the status API handed the dialog OpenCodex's own config path instead of the
effective $CODEX_HOME/config.toml, and the Codex card kept its pre-toggle state until a
full reload because the routing resource was never refreshed (#3406).

- IntegrationsOverview: Codex-specific consequence copy (six new i18n keys in every
  locale); desired switch state (toggleOn) drives both the switch and its accessible
  label; refreshNativeDetails also refreshes codexResource after a Codex mutation.
- overview-clients: codexRow takes the native status row so the switch shows desired
  state, the badge stays derived from observed routingInjected, and togglePath /
  toggleBlocked come from the native payload.
- native-integration-routes: codexStatus reports join(getCodexHome(), "config.toml").
- Tests: rows, mounted surface (no PUT before confirm, correct PUT, refreshed switch
  and badge), state merge, and the backend toggle route with an isolated CODEX_HOME
  (realpath'd so macOS /var vs /private/var agree).

Carries #3407 onto the current stack head via a clean merge; the only change on top is
the realpath fixture fix.

Closes #3406

Co-authored-by: turin <koomj5258@gmail.com>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 4, 2026 23:48
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 3434febe-fcb7-41b7-9b5f-f0b93ee10116

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 added the bug Something isn't working label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

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

The product direction is coherent on this stacked head: the switch uses desired state, the badge remains observed routing state, Codex receives its effective CODEX_HOME/config.toml path instead of OpenCodex's config path, and the post-mutation refresh covers both native details and the Codex routing resource. The screenshot and focused GUI/backend tests cover the user-visible change.

I am requesting changes because this PR targets codex/3464-launchd-stable-launcher, whose parent chain (#3554 -> #3551 -> #3547) is still blocked. UI/text changes also require final maintainer confirmation and exact-head GUI/CI evidence on the integration base.

After the parent chain lands, retarget/rebase this carry onto the then-current dev. Ensure the final diff contains only the Codex toggle/backend/docs/i18n/test changes and does not retain unrelated stack-ledger deletions, then rerun exact-head Cross-platform CI, React Doctor, GUI lint/i18n/build, and the focused surface tests. I will re-review that final head; do not merge into the temporary parent branch.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 69 / 80

이 PR은 Integrations 개요의 Codex 카드가 지금 dev에서 거짓말하던 세 가지를 고칩니다. 첫째, Codex를 끌 때 확인창이 Grok Build 문구(GROK_DISABLE_COPY)를 그대로 보여 줍니다. 둘째, 상태 API가 Codex가 실제로 읽는 $CODEX_HOME/config.toml이 아니라 OpenCodex 자신의 getConfigPath()를 경로로 넘깁니다. 셋째, 토글 직후에도 관측 라우팅 리소스(codexResource)를 다시 읽지 않아 배지가 새로고침 전까지 옛 상태를 유지합니다. 고치는 쪽은 분명합니다. IntegrationsOverview.tsx에 Codex 전용 결과 다이얼로그 카피(integrations.dialog.codex.*, 로케일 9개)를 두고, 스위치와 aria 라벨은 원하는 상태(toggleOn/desiredEnabled)를 따르게 하며, refreshNativeDetailscodexResource.refresh()도 호출합니다. overview-clients.tscodexRow는 네이티브 상태 행을 받아 스위치(원하는 값)·배지(관측 routingInjected)·경로/차단을 나눕니다. 서버는 native-integration-routes.ts에서 Codex만 join(getCodexHome(), "config.toml")을 보고하고 Claude는 그대로 getConfigPath()입니다. #3407(turin-dev) 캐리이며, 테스트에 macOS /var vs /private/varrealpathSync만 얹었습니다. 지금 dev HEAD(445742966)에는 아직 Codex 다이얼로그 키가 없고 GET이 여전히 codexStatus(config, getConfigPath())라서 #3406 버그는 열려 있습니다. 다만 베이스가 dev가 아니라 #3554 헤드(codex/3464-launchd-stable-launcher)이고 부모 체인(#3547#3551#3554)이 아직 막혀 있어, 지금 당장 dev에 단독 머지할 수는 없습니다. 원본 #3407은 dev 기준 CONFLICTING이라 이 캐리가 맞는 착지 경로입니다.

라인 IntegrationsOverview.tsx ConsequenceDialog - pendingToggle.id === "codex"일 때 CODEX_DISABLE_COPY를 쓰는 분기가 #3406의 “Grok 문구가 뜬다”를 직접 닫습니다. Desktop/Grok 분기도 유지됩니다.
라인 overview-clients.ts codexRow - 정리 중(desiredEnabled: false인데 routingInjected: true)에도 배지는 current/applied를 유지하고 스위치만 꺼진 상태를 보여 줍니다. 관측과 의도를 섞지 않는 설계가 맞습니다.
라인 native-integration-routes.ts GET /api/native-integrations - Codex만 getCodexHome() 경로로 바꿉니다. 인증·쓰기 경로는 그대로이고 보고 문자열만 바뀌므로 MAINTAINERS 보안 범위는 좁습니다.
경로 tests/codex-integration/native-codex-toggle.test.ts realpathSync - macOS 임시 경로 symlink를 풀어 상태 행 경로 단언이 깨지지 않게 한 캐리 전용 수정입니다. 남겨 두는 게 맞습니다.
경로 스택 베이스 / 개발일지 - base가 #3554이고 개발일지에 부모 wp 요약 삭제·ledger 갱신이 섞여 있습니다. dev로 리타겟할 때 Codex 토글·백엔드·i18n·테스트·가이드만 남기고 스택 장부 노이즈는 빼는 편이 안전합니다. Ingwannu CHANGES_REQUESTED와 같은 방향입니다.
경로 #3407 원본 - dev CONFLICTING 상태로 열려 있습니다. 이 캐리가 머지되면 Landed via #3556 at <commit> + landed-via-maintainer로 닫아야 합니다.

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

너의 추천
부모 체인(#3547#3551#3554)이 dev에 들어간 뒤 이 PR을 dev로 리타겟하고, Codex 토글 관련 파일만 남긴 exact-head CI(크로스플랫폼·React Doctor·GUI lint/i18n/build·포커스 테스트)가 초록이면 머지하세요. 임시 부모 브랜치로 머지하지 마세요. 머지 후 #3406은 닫고, leftover #3407은 landed-via-maintainer로 정리하세요.

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

lidge-jun added a commit that referenced this pull request Sep 5, 2026
Owner-authorized admin merge of the child-only Codex toggle carry. Existing screenshot and contributor credit preserved. Final dev HEAD CI is the gate; no local tests.
@lidge-jun

Copy link
Copy Markdown
Owner Author

Carried into dev by #3617 at 3b3fe21, with original attribution retained and the concrete follow-up corrections described there. Closing the source PR as superseded. Final dev HEAD CI is still pending under the owner-authorized admin-merge workflow; this closure does not claim CI success.

@lidge-jun lidge-jun closed this Sep 5, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

Landed via #3617 at 3b3fe21

@lidge-jun lidge-jun added the landed-via-maintainer Original PR closed after landing via a maintainer merge train label Sep 5, 2026
@lidge-jun
lidge-jun deleted the codex/3406-codex-toggle-truth branch September 5, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working landed-via-maintainer Original PR closed after landing via a maintainer merge train

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants