Skip to content

feat(codex): add frontend bridge types and i18n keys (PR 3/5) - #258

Merged
Finesssee merged 1 commit into
nesszer:mainfrom
BlazzzPlay:feat/codex-account-frontend-bridge
Aug 6, 2026
Merged

feat(codex): add frontend bridge types and i18n keys (PR 3/5)#258
Finesssee merged 1 commit into
nesszer:mainfrom
BlazzzPlay:feat/codex-account-frontend-bridge

Conversation

@BlazzzPlay

@BlazzzPlay BlazzzPlay commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • Add the typed invoke bridge and DTOs for ADR 0003 account commands: tauri.ts exposes list/add/remove/switch/fetch/snapshots/restart-desktop + accounts state.
  • Add bridge.ts DTOs: CodexAccount, CodexAccountUsageSnapshot, CodexSwitchResult, CodexAccountsStateBridge, usage/credits windows.
  • Add 13 CodexAccounts* locale keys to keys.ts, locale.rs, en-US.ftl, es-MX.ftl.

Related issue

ADR 0003 (docs/adr/0003-multi-account-codex.md). No issue number yet.

Affected areas

  • Tray panel
  • Settings UI (bridge/types that the accounts panel will consume)
  • Config file / settings persistence
  • Provider-specific behavior (Codex accounts bridge)
  • Installer / release packaging
  • Startup / background behavior
  • Documentation (i18n keys)
  • Other:

Validation

Hosted PR check runs on Blacksmith Windows when CI_BUDGET_MODE is not off (see .github/workflows/pr-check.yml and CONTEXT.md). Still run the local slice and list commands/results below. If a check is not relevant, say why.

  • powershell.exe -ExecutionPolicy Bypass -NoProfile -File scripts\local-check.ps1
  • For full pre-release validation: powershell.exe -ExecutionPolicy Bypass -NoProfile -File scripts\local-check.ps1 -All -Version <version>
  • For installer/release changes: powershell.exe -File scripts\windows-release-build.ps1 -Ref <ref> -SmokeInstall
  • Thermo-nuclear code quality review completed before submitting: https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/thermo-nuclear-code-quality-review/SKILL.md
  • Other: pnpm test (224 tests) and pnpm run build pass

UI / tray proof

For UI, tray, settings, or visual behavior changes, use CUA Driver for visual proof. If CUA Driver cannot be used, explain why and attach equivalent manual proof.

  • Not applicable (bridge types + i18n only; no visual surface rendered yet)
  • CUA Driver visual proof attached
  • CUA Driver could not be used; equivalent manual proof and explanation attached

Notes for reviewers

Chain Context

Field Value
Chain codex-multi-account (ADR 0003)
Tracker PR Not needed (stacked PRs to main)
Position 3 of 5
Base main (rebase after #256 merges)
Depends on #256 (shell commands)
Follow-up #4 settings accounts panel
Review budget 159 / 400
Starts at #256 merged state
Ends with React can invoke all Codex account commands with typed payloads; locale keys present

Chain Overview

main
 ├── #255 domain core — reviewed
 ├── #256 shell commands + lanes — reviewed
 └── 📍 #3 This PR — frontend bridge + i18n
      └── #4 settings accounts panel
           └── #5 tray menu flyout

Scope

  • Includes: tauri.ts bridge fns, bridge.ts DTOs, keys.ts + locale.rs + .ftl key additions.
  • Excludes: UI components (CodexAccountsSection/Menu), tray/menu wiring — follow-up PRs.

Autonomy

  • CI is expected to pass for this PR branch
  • This PR has one deliverable scope
  • This PR can be rolled back without unrelated changes
  • Tests cover this unit (224 frontend tests incl. bridge/keys)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@Finesssee

Copy link
Copy Markdown
Collaborator

Thanks for the PR, I will review this ASAP.

@Finesssee

Copy link
Copy Markdown
Collaborator

Thermo-nuclear review (3/5 — bridge): approve with one completeness nit.

The bridge DTOs are typed end-to-end (no serde_json::Value leaking past lib/tauri.ts; CodexAccountUsageSnapshot/CodexSwitchResult map 1:1 onto the Rust serde shapes, camelCase consistent). Wrapping all eight commands in one namespace import in tauri.ts keeps call-site noise down.

Nit: the 13 new CodexAccounts* locale keys landed only in keys.ts + locale.rs + en-US.ftl + es-MX.ftl — our check-locale permits English-fallback, but our current convention (as of the Low Power port in #252) is to machine-translate all 7 catalogs at once to avoid drift. If you want a board-cleaner, add the same 13 keys to ja-JP, ko-KR, zh-CN, zh-TW, ru-RU in the same machine-translated style; otherwise fallback handles it.

Expose ADR 0003 account commands to React via the typed invoke bridge,
add bridge DTOs (CodexAccount, snapshots, switch result, state), and add
the CodexAccounts locale keys for en-US and es-MX.
@Finesssee
Finesssee force-pushed the feat/codex-account-frontend-bridge branch from 54d3af5 to 803b92a Compare August 6, 2026 06:31
@Finesssee
Finesssee merged commit 7ab4b0f into nesszer:main Aug 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants