Repository navigation
test(agent): pin the reasoning block - Reasoning, ReasoningTrigger, ReasoningContent (Closes #1609) - #1935
Merged
Conversation
β¦easoningContent (Closes #1609)
Summary by t27-beesThis PR adds a contract test file pinning the current HTML output of three memo components (Reasoning, ReasoningTrigger, ReasoningContent) rendered via Worth a look
Read: 1 files, +109 -0, the whole diff. Head |
β Tests passed β 3558/3628
|
Collaborator
Author
|
CI gates on this SHA:
Dmitrii Fedorov (@dmitrii-f-t27) |
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.
Closes #1609
What changed
One new file:
trios/agent-server/apps/agent/components/ai-elements/reasoning.test.ts(the path the issue's Success Criteria names). The subjectreasoning.tsxis untouched.All 3 exported symbols are exercised (3
it(blocks; 0 blocked). Every export is a memo component reading the subject's own context, so the suite renders each one inside the root that provides it, withrenderToStaticMarkup:Reasoning(1 test): the root gates its collapsible - the parts render while open (measured: the open content carries its Streamdown container) and the closed root hides the content (the emptyhiddencontainer, nothing inside).ReasoningTrigger(1 test): the thinking message for the state it reads - streaming says Thinking..., an unset duration says Thought for a few seconds, a measured one names its seconds - with the chevron following the open state, and its own label when children are handed in.ReasoningContent(1 test): the reasoning container with its text spacing renders while the root is open, and the closed root renders nothing inside the hidden container.Not pinned, and why: the streaming duration itself and the auto-close timer - both live in effects that need a live document; the static pins read what each piece renders in either state. No mocks at all; no suite of this job mocks any module in this subject's import graph.
How it was verified (FR-004)
3 pass / 0 fail / 15 expect() calls, Ran 3 tests across 1 file.2 pass / 1 fail / 9 expect() calls. The subject was restored byte-identical (git checkout;git diff --name-onlyprints nothing) and the suite passes again.bun run typecheckrunswxt prepare, whose generated.wxt/tsconfig.jsonmakes bun 1.3.6 stop resolving@/aliases for test runs until that generated directory is removed. CI's Tests jobs never runwxt prepare; every run quoted above is from a checkout without.wxt/.Not verified
Tests / agentjob re-runs the suite on this SHA.Dmitrii Fedorov (@dmitrii-f-t27)