Repository navigation
fix(dashboard): unwrap question replies for every Codex id - #1289
Merged
Merged
Conversation
|
No findings in the specified PR diff. The PR description includes sufficient real-CLI verification: built CLI runs through No builds, tests, installs, or PR code were executed during this review. |
|
No findings in the specified PR diff. The earlier review also reported none. The PR description documents sufficient real-CLI verification: built Only the specified diff was read. No PR code, builds, tests, or installs were executed. |
jeff-r2026
approved these changes
Oct 23, 2026
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1287. The dashboard showed the answer from a Codex question reply only for the
codextool id. Fortcodexandcodex-internal, the session preview still showed the<send_user_message_question_reply>envelope and the question metadata, which is the #1286 symptom.The unwrap was gated on
normalizeToolName(tool) === 'codex'.normalizeToolNamemaps IDE tool names such asexecute_command, not agent ids. The gate now uses the file'sisCodexTool, which already decides the other Codex-specific paths indashboard-collector.ts.Three smaller points from the same function:
[{"answer":""}]) now keeps the prompt, so the turn is still counted. After fix(dashboard): show readable session previews #1287, the empty answer stripped to nothing and the event was dropped. It now records the event as main did before fix(dashboard): show readable session previews #1287.unknowninstead ofany.JSON.parsealready skips that whitespace. With an open tag, 1000 spaces and no closing tag, the old pattern took 192 ms and the new one 0.05 ms. With 100,000 spaces the new one takes 0.09 ms.Type of Change
Test Plan
npx tsc --noEmitpassesnpm run lintpassesnpx vitest run src/__tests__/dashboard-collector.test.ts: 176 passed. Thetcodex,codex-internaland empty-answer cases failed before the fix.npx vitest runwas not run locally.Real CLI, comparing a build of
main(c15fc0db) with this branch. In an isolated HOME, each payload goes throughteamai dashboard-report --stdin --tool <id>. Then the builtteamai dashboardruns on a free port, and the result is read from/api/sessions:maincodex, answerUse the web interface.tcodex, answerquestionItemIdmetadataUse the web interface.codex-internal, answerquestionItemIdmetadataUse the web interface.codex,[{"answer":""}]codex, secret in answer<REDACTED:gh_tok> xxx…, 200 charscodex, malformed JSONclaude, envelopeEvery
dashboard-reportcall and thecurlexited 0.Related Issues
Refs #1286, #1287
Notes for Reviewers
dashboard-collector.tshas its ownisCodexTool, a substring check, next to the exact list insrc/utils/tool-names.ts(CODEX_TOOL_IDS). This PR uses the local one so that every Codex check in the file agrees. Moving the file onto the shared list is a separate change.