Prepare Codex Deck v0.6.1 - #3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3bf3b3eb2
ℹ️ 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".
| this.recentSessions = await Promise.all(recent.map(async ({ threadId, path, activityAt }) => ({ | ||
| threadId, | ||
| activityAt, | ||
| status: now - activityAt <= 15 * 60_000 ? await readRecentSessionStatus(path) : "idle" | ||
| }))); |
There was a problem hiding this comment.
Gate rollout-tail reads to multi-host mode
In a single-host installation, CodexMicroRendererBridge.refresh() still calls annotate() unconditionally, so this now reads up to 512 KiB from every recently modified rollout despite the README security guarantee that single-host mode reads no rollout data and rollout contents are never read. Even though only derived tags are relayed, the local file-content access happens without a relay being configured; enable this catalog only when multi-host ownership is needed or update the security disclosure.
Useful? React with 👍 / 👎.
| for (let index = 0; index < sessionFiles.length; index += 32) { | ||
| const batch = sessionFiles.slice(index, index + 32); | ||
| const resolved = await Promise.all(batch.map(async ({ threadId, path }) => { | ||
| try { | ||
| const info = await stat(path); | ||
| return { threadId, path, activityAt: info.mtimeMs }; | ||
| } catch { return null; } | ||
| })); | ||
| files.push(...resolved.filter((value): value is NonNullable<typeof value> => value != null)); |
There was a problem hiding this comment.
Avoid statting the entire rollout history every refresh
For users with a long-lived Codex history, this loop issues a stat for every file under both active and archived session roots before limiting the catalog to 128 entries. Because the ownership index refreshes every five seconds, thousands of historical rollouts cause continuous filesystem churn and can delay the 1.2-second bridge polling path; cache unchanged metadata or restrict traversal to recent directories/files before statting.
Useful? React with 👍 / 👎.
What changed
Why
Multi-host slots could become stale, route mirrored tasks to the wrong computer, or lose custom/pinned behavior after Codex updates. A real Mac power-loss incident also exposed an unhandled authenticated relay snapshot: Node terminated the watcher before native Micro signals were ready, LaunchAgent restarted it, and generation-scoped recovery could repeat across new PIDs.
The macOS watcher now never launches a closed Codex app, waits for an unbridged process to stabilize, and applies a generation-independent recovery cooldown. Relay snapshot failures are caught and rate-limited, with LaunchAgent stderr retained separately.
User impact
Validation
npm run checknpm test— 73/73 passednpm run validatenpm run packnpm run audit:release0755