Skip to content

feat(agent): add Tool, ToolApproval, ToolGroup, Reasoning and Activity - #8

Closed
pratikbuilds wants to merge 1 commit into
conversation/13-panel-tabsfrom
conversation/03-agent-steps
Closed

pratikbuilds wants to merge 1 commit into
conversation/13-panel-tabsfrom
conversation/03-agent-steps

Conversation

@pratikbuilds

Copy link
Copy Markdown
Owner

Tool renders every ToolTraceStatus with an icon and a word, and its input and output come through a render prop. ToolApproval asks a person to approve once, approve always or deny, and renders a settled decision from the approval record itself. ToolGroup shows calls that ran at the same time, Reasoning shows thinking with its duration, and Activity folds both into one summary line showing the latest ten steps.

The stories axe sweep now measures text contrast itself wherever axe cannot: it hit-tests each text box to find the ground actually under it, composites colour and opacity layers, reads gradient and fill colours, and reports anything it cannot resolve as unmeasured rather than passing it. Browser fixtures pin the cases that must never pass.

Stacked on #7: review only this commit. Part of corbitsdev#94.

Notes for review

  • Displayed status comes from one internal helper (src/lib/tool-display.ts) so the header word, failed counts and open-on-error agree with the approval record.
  • The axe sweep gains a measured contrast fallback for translucent backgrounds (pure maths in e2e/contrast.ts). Its failures use their own keys (color-contrast-measured / -unmeasured); large text uses a 3:1 floor; unmeasurable nodes are reported, not skipped.
  • e2e/stories-a11y.known.json gains 34 entries, all for pre-existing stories the new check now measures (sidebar badge 4.38:1 on stacked washes; unmeasurable text in prompt-input, avatar, shimmer, thinking-label and chart stories). Clearing them belongs with the known-violations cleanup.
  • The pending-approval story passes contrast on --attention-wash in both themes.
  • A decision that folds the call into an earlier run unmounts ToolApproval; the message renderer should move focus to that run's ActivityTrigger. Pass onDecide to ToolGroup for batches.
  • Activity shares its name with React 19.2's Activity; consumers importing both alias one.
  • test:e2e now also runs e2e/contrast.test.ts (the contrast maths), and CONTRIBUTING.md says so. The fallback composites colour and opacity layers from the text to the root; filters, blend modes and unresolved paint mark a sample unmeasured.
  • ToolGroup's header counts calls awaiting approval as waiting ("2 at once · 1 done · 1 waiting for approval"); Reasoning's trigger is named by its summary only.

Verification

  • This commit passes bun run typecheck and bun run lint on its own (the stack is checked commit by commit).
  • At the top of the stack: bun run check, bun run build, bun run dep-guard, bun run contrast-test and bun run test:e2e (Playwright specs and the Storybook axe sweep in light and dark) pass.

Closes corbitsdev#97

Tool renders every ToolTraceStatus with an icon and a word, and its
input and output come through a render prop. ToolApproval asks a person
to approve once, approve always or deny, and renders a settled decision
from the approval record itself. ToolGroup shows calls that ran at the
same time, Reasoning shows thinking with its duration, and Activity
folds both into one summary line showing the latest ten steps.

The stories axe sweep now measures text contrast itself wherever axe
cannot: it hit-tests each text box to find the ground actually under
it, composites colour and opacity layers, reads gradient and fill
colours, and reports anything it cannot resolve as unmeasured rather
than passing it. Browser fixtures pin the cases that must never pass.
@pratikbuilds

Copy link
Copy Markdown
Owner Author

Moved upstream: corbitsdev#120

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.

1 participant