Skip to content

feat(site): warn when workspace logs are truncated in Agents chat - #32305

Merged
jakehwll merged 2 commits into
mainfrom
jakehwll/CODAGT-1185-truncated-workspace-logs
Nov 17, 2026
Merged

jakehwll merged 2 commits into
mainfrom
jakehwll/CODAGT-1185-truncated-workspace-logs

Conversation

@jakehwll

@jakehwll jakehwll commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 This PR was modified by Coder Agents on behalf of Jake Howell.

Agents chat now warns when workspace build or agent startup logs reach the storage limit. Startup warnings include /tmp/coder-startup-script.log as a recovery path.

Keep known truncation warnings visible when logs are empty or fail to load. Preserve overflow-only workspace updates, recover completed-build metadata after workspace lookup failures, and retain historical build metadata when a newer build starts. Show a separate notice when truncation status cannot be checked.

Refs CODAGT-1185.

Validation and review decisions
  • Passed 24 focused unit tests and 14 Storybook tests, pnpm check, pnpm lint, pnpm format:check, make lint/emdash, and git diff --check.
  • Regression tests cover overflow-only build and agent updates, the build-ID fallback after workspace lookup failure, and metadata retention across a newer-build watch event. Stories cover empty, waiting, and failed log output.
  • Checked the five added Storybook states in dark and light themes at desktop and 320px widths. Axe reported no violations or incomplete results; keyboard focus checks passed. No actual screen-reader test or base-branch visual comparison was run.
  • Completed the frontend pattern check, eight independent frontend review roles, test audit, and documentation self-check with no remaining blocking or should-fix findings. No product-docs changes were needed.
  • Reused the existing React Query cache for historical metadata rather than adding polling or mirrored state. Story query fixtures are local to each story, and exported query-key helpers are documented.
  • Corrected the earlier accessibility assessment: tool output already renders inside the transcript's role="log" live-region ancestor. No nested live region was added. The Codex accessibility thread remains open because actual screen-reader announcements have not been verified.
image

@jakehwll
jakehwll temporarily deployed to main November 17, 2026 02:43 — with GitHub Actions Inactive
@jakehwll
jakehwll temporarily deployed to main November 17, 2026 02:43 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 17, 2026

Copy link
Copy Markdown

CODAGT-1185

@jakehwll
jakehwll temporarily deployed to main November 17, 2026 02:45 — with GitHub Actions Inactive
@jakehwll
jakehwll marked this pull request as ready for review November 17, 2026 02:47
@jakehwll
jakehwll requested a review from a team as a code owner November 17, 2026 02:47
@jakehwll
jakehwll temporarily deployed to main November 17, 2026 02:47 — with GitHub Actions Inactive
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T02:52:33.438914Z 4ce6515 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ce6515461

ℹ️ 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".

Comment on lines +139 to +141
{!build && (workspaceQuery.isError || historicalBuildQuery.isError) && (
<LogNotice icon="warning">
Unable to check whether build logs were truncated.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Announce the asynchronous truncation-status failure

When either metadata query fails after the expanded log section has rendered, this notice is inserted dynamically through LogNotice, which has neither a live-region role nor aria-live. Screen-reader users are therefore not informed that truncation status could not be checked; use the existing alert primitive or add appropriate status semantics.

Useful? React with 👍 / 👎.

Comment thread site/src/api/queries/workspaceBuilds.ts Resolved
@jakehwll
jakehwll temporarily deployed to main November 17, 2026 03:57 — with GitHub Actions Inactive
@jakehwll
jakehwll temporarily deployed to main November 17, 2026 03:58 — with GitHub Actions Inactive
Comment on lines +62 to +67
enabled:
Boolean(effectiveBuildId) &&
!isRunning &&
(!workspaceId ||
((workspaceQuery.isSuccess || workspaceQuery.isError) &&
!watchedBuild)),

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.

pain

@jakehwll
jakehwll merged commit 61ea77f into main Nov 17, 2026
29 of 30 checks passed
@jakehwll
jakehwll deleted the jakehwll/CODAGT-1185-truncated-workspace-logs branch November 17, 2026 09:10
@jakehwll
jakehwll temporarily deployed to main November 17, 2026 09:10 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
docs-preview — 84c282b9 Deployed Nov 17, 2026 by jakehwll via cleanup #156
main — 84c282b9 Deployed Nov 17, 2026 by jakehwll via cla #258473
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants