Skip to content

test(agent): pin the glowing border - GlowingBorder, GlowingElement (Closes #1631) - #1933

Merged
dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1631-glowing-border
Oct 13, 2026
Merged

dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1631-glowing-border

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator

Closes #1631

What changed

One new file: trios/agent-server/apps/agent/components/elements/glowing-border.test.ts (the path the issue's Success Criteria names). The subject glowing-border.tsx is untouched.

The 2 exported symbols are exercised (2 it( blocks; 0 blocked):

  • GlowingBorder (1 test): rendered with renderToStaticMarkup - measured, the static render goes through the motion hooks and shows the frame it answers: the cosmetic svg carrying the corner radii and the rest of the props, the rect the animation walks, and the children drawn twice - once in each of the two absolutely-positioned layers the travelling glows sit in.
  • GlowingElement (1 test, direct call): the orange gradient square the glows are made of.

Not pinned, and why (issue User Story 2): the animation itself - the frame loop pacing two glows along the path - needs a live document with requestAnimationFrame; the static pins read the frame it renders. No mocks at all; no suite of this job mocks any module in this subject's import graph.

How it was verified (FR-004)

  • Passing run against the unmodified subject: 2 pass / 0 fail / 8 expect() calls, Ran 2 tests across 1 file.
  • Deliberately broken copy (the gradient square's size classes changed, valid syntax): 1 pass / 1 fail / 7 expect() calls. The subject was restored byte-identical (git checkout; git diff --name-only prints nothing) and the suite passes again.
  • No network, database or container; no existing test modified or weakened. The file is biome-check clean. The local typecheck reports 59 errors - the pre-existing local base of this tree - and 0 mentions of the new file.
  • Local reproducibility note (issue bun test cannot resolve @/ aliases once .wxt/tsconfig.json exists (wxt prepare output breaks the bun 1.3.6 runtime resolver)Β #1909): bun run typecheck runs wxt prepare, whose generated .wxt/tsconfig.json makes bun 1.3.6 stop resolving @/ aliases for test runs until that generated directory is removed. CI's Tests jobs never run wxt prepare; every run quoted above is from a checkout without .wxt/.

Not verified

  • Nothing beyond the quoted local runs; the CI Tests / agent job re-runs the suite on this SHA.

Dmitrii Fedorov (@dmitrii-f-t27)

@tri-claw

tri-claw Bot commented Oct 13, 2026

Copy link
Copy Markdown

Summary by t27-bees

This PR adds a contract test file pinning the current output of GlowingBorder and GlowingElement from glowing-border.tsx. The tests use renderToStaticMarkup for the motion-driven GlowingBorder and a direct call for the hook-free GlowingElement, asserting on specific markup and class names so future changes have a baseline to fail against.

Worth a look

  • glowing-border.test.ts:42-47 β€” GlowingElement is called directly and cast to { props: { className: string } }. If the component ever returns a fragment, a different element type, or null, the cast will succeed at compile time but the runtime element.props access will throw, making the test crash instead of fail cleanly.
  • glowing-border.test.ts:45-46 β€” The assertions toContain('h-20 w-20') and toContain('radial-gradient') depend on exact class ordering and spacing. A harmless class reorder (e.g., w-20 h-20) or an added utility class between them would fail the test despite identical visual output.
  • glowing-border.test.ts:26-33 β€” The GlowingBorder test asserts on implementation details: position:absolute appearing twice and the child text GLOW-CHILD appearing twice. If the layer structure changes (e.g., a wrapper div added, or children rendered via a portal), these counts shift and the test fails even if the visual contract holds.
  • glowing-border.test.ts:15-33 β€” The test relies on motion hooks (useMotionValue, useAnimationFrame, etc.) executing during renderToStaticMarkup. If the motion library changes to skip animation setup in SSR/static contexts, the rendered frame (the rect, the corner radii, the dual layers) could differ, causing false negatives.

Read: 1 files, +58 -0, the whole diff. Head c90d7f7. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator Author

Tests / server-tools failed on the first CI run - the known ACL flake of #1901 (the same job that fails intermittently on this branch's base). Rerunning the failed job once per the wave's flake protocol; will record the outcome here.

Dmitrii Fedorov (@dmitrii-f-t27)

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

βœ… Tests passed β€” 3555/3625

Suite Passed Failed Skipped
βœ… agent 190/190 0 0
βœ… build 9/9 0 0
βœ… cdp-protocol 5/5 0 0
βœ… eval 93/93 0 0
βœ… server-agent 280/280 0 0
βœ… server-api 2152/2221 0 69
βœ… server-browser 6/6 0 0
βœ… server-integration 10/11 0 1
βœ… server-lib 279/279 0 0
βœ… server-pglive 166/166 0 0
βœ… server-root 68/68 0 0
βœ… server-sim 8/8 0 0
βœ… server-skills 31/31 0 0
βœ… server-tools 244/244 0 0
βœ… shared 14/14 0 0

View workflow run

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator Author

The Tests / server-tools flake (#1901) passed on the rerun - the run completed success. CI gates on this SHA:

  • Tests / agent: pass β€” both glowing-border pins run in the agent group.
  • All other Tests/ matrix jobs pass* (server-tools after one flake rerun, recorded above; server-pglive green on the first run).
  • Typecheck job: 19 errors = the known base count; 0 mentions of glowing-border.test.ts in the job log.
  • Biome job: red from base findings; 0 mentions of glowing-border.test.ts in the job log.

Dmitrii Fedorov (@dmitrii-f-t27)

@dmitrii-f-t27
dmitrii-f-t27 merged commit 7a8a6e7 into queen Oct 13, 2026
32 of 35 checks passed
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