Skip to content

fix(dashboard): show readable session previews - #1287

Merged
SaulMoro merged 2 commits into
Tencent:mainfrom
MertensMing:codex/dashboard-preview-1286
Oct 22, 2026
Merged

SaulMoro merged 2 commits into
Tencent:mainfrom
MertensMing:codex/dashboard-preview-1286

Conversation

@MertensMing

@MertensMing MertensMing commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Session previews now use a three-line clamp with an ellipsis.
Text no longer ends halfway through a line.
Codex question replies now show the answer instead of wrapper markup and question metadata.

Type of Change

  • Bug fix

Test Plan

  • npm run build passes.
  • npm run typecheck passes.
  • npm run lint passes.
  • Dashboard unit tests pass: 180 tests across dashboard-collector and dashboard-ui.
  • Added tests cover multiple answers, long metadata, redaction, malformed replies, and other tools.
  • The built dashboard CLI test passes for the git provider.
  • Hook regression tests pass: 39 tests across three files.
  • The built Codex dispatcher CLI tests pass: 12 tests.

The dashboard CLI test reports a structured Codex reply through dashboard-report --stdin.
It then starts the built dashboard and checks the answer through /api/sessions.
The same test checks four agent records and live SSE updates.
The GitLab and GitHub fixture cases were skipped locally.

Browser check: I started the built CLI with isolated session fixtures.
I checked long Chinese text, English text, and a structured reply in the execution table.
Chinese overflow shows an ellipsis at a complete line boundary.
The structured reply shows Use the web interface..
The details drawer still shows the full stored summary.

Related Issues

Fixes #1286

CI repair

The first run failed in six lint/test jobs and the Windows job.
The failing hook code and tests were unchanged from the upstream base.
The static Windows test check rejected an unpinned shell assertion.
Windows also exposed a mismatch in the Codex dispatcher command.

Codex now keeps bare bash in its portable command field.
Its native commandWindows field remains unchanged.
Other tools retain their existing shell selection.
The regression test now pins both Linux and Windows platforms.
The new Windows CI job passes.

Notes for Reviewers

The collector extracts answers before redaction and the existing 200-character limit.
It only unwraps a complete Codex reply envelope with string answers.
Malformed payloads and prompts from other tools keep their existing behavior.
Question metadata no longer contributes correction keywords.
The client still escapes displayed text.

The existing summary storage limit remains unchanged.
The details view does not recover text beyond that limit.
Old truncated events remain unchanged.
The full provider matrix was not run locally.
A local full unit run was stopped before completion.
That partial run showed the known ZCode failure in project-hook-rules.test.ts.
It was not a full validation of the final commit.

@github-actions

Copy link
Copy Markdown

No confident findings in the specified PR diff.

The PR description documents sufficient testing: a representative built real-CLI run covers dashboard-report --stdin and /api/sessions, plus a browser check for preview rendering. Deferred GitLab/GitHub coverage is not blocking.

Review was read-only; I did not run, build, or install anything from the PR.

@github-actions

Copy link
Copy Markdown
  • [P2 non-blocking] Keep the dispatcher shell change separate from the preview fix (src/builtin-hooks.ts:254). For Codex, this replaces getHookShellCommand() with literal bash, independently changing hook command generation. Neither it nor the corresponding hook-test changes address session previews; split them into a focused PR to satisfy the surgical-change rule.

The PR description documents sufficient testing: a representative built real-CLI run exercises dashboard-report --stdin and /api/sessions, with a browser check for rendering. Deferred provider coverage is not blocking.

The earlier pass reported no findings, so none require a resolution note. Review was diff-only; I did not run, build, or install anything from the PR.

@SaulMoro SaulMoro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was generated by AI during triage.

@MertensMing Thanks. Approving e90c432e.

The preview fix works for codex in a built-CLI run through dashboard-report --stdin and /api/sessions. Redaction still applies to the extracted answer, and malformed envelopes and other tools keep their current behavior. The three-line clamp renders as described.

The getTeamHookDispatchCommand change matches the rule getDispatchCommand already follows for Codex, and it makes main's Windows test list pass again.

We'll open a follow-up issue for what remains: tcodex and codex-internal, and an empty answer.

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.

Dashboard: session previews clip text mid-line and expose raw Codex reply payloads

3 participants