Skip to content

fix(web): add missing exec timestamps to ToolCard test fixture#1057

Merged
tiann merged 1 commit into
tiann:mainfrom
junmo-kim:fix/toolcard-test-typecheck
Jul 17, 2026
Merged

fix(web): add missing exec timestamps to ToolCard test fixture#1057
tiann merged 1 commit into
tiann:mainfrom
junmo-kim:fix/toolcard-test-typecheck

Conversation

@junmo-kim

Copy link
Copy Markdown
Contributor

Problem

bun typecheck fails on main:

src/components/ToolCard/ToolCard.test.ts(24,9): error TS2739: Type '{ id: string; name: string; state: "completed"; input: {}; createdAt: number; startedAt: number; completedAt: number; description: null; }' is missing the following properties from type 'ChatToolCall': execStartedAt, execCompletedAt

The test workflow runs bun typecheck before bun run test, so the job stops there and the test check goes red for any PR whose workflow runs after this point (#1054 and #1056 so far). PRs whose workflow last ran earlier still show a green check.

#1036 made execStartedAt and execCompletedAt required on ChatToolCall and updated the fixtures that existed at the time. My #1045 added a new fixture to ToolCard.test.ts, written against a base from before those fields existed, and the two landed about a minute apart - so each branch type-checked cleanly against its own base and the gap only appears with both on main. Sorry for the noise.

Fix

Set both fields to null in the fixture, matching the sibling fixtures in ToolGroupCard.test.ts and groupedPresentation.test.ts, since these cases do not exercise tool execution duration.

Tests

On this branch bun typecheck is clean and bun run test passes across cli, hub, web and shared.

@tiann - flagging for visibility since this blocks the test check for new runs.


AI disclosure (per CONTRIBUTING.md): Claude Opus 4.8.

The ChatToolCall fixture in ToolCard.test.ts does not set execStartedAt
and execCompletedAt, which became required fields, so bun typecheck fails
on main with TS2739.

The fixture was added while those fields did not exist yet, and the change
that introduced them landed a minute earlier, so each side type-checked
against its own base and the gap only appears once both are on main.

Set both to null, matching the sibling fixtures in ToolGroupCard.test.ts
and groupedPresentation.test.ts, since these cases do not exercise tool
execution duration.

@github-actions github-actions 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.

Findings
No issues found in the changed lines.

Questions
None.

Summary
Review mode: initial
No findings. The fixture now includes the required execStartedAt and execCompletedAt fields, matching the surrounding test fixture pattern that uses null when execution duration is not under test. Residual risk is limited to unrun automation in this review pass.

Testing
Not run (automation).

HAPI Bot

@tiann
tiann merged commit d5aeeb5 into tiann:main Jul 17, 2026
2 checks passed
@junmo-kim
junmo-kim deleted the fix/toolcard-test-typecheck branch July 17, 2026 04:03
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