Skip to content

PR #348 review follow-ups: string results, embed css glob, testkit hygiene, fixtures off the public entry #398

Open

Description

@omridevk

Parent: #381. Blocked by: none — can start immediately.

What to build

The residue from the PR #348 automated review that no other issue owns. Small, independent, verified to
still reproduce. Anything the reviewers filed that turned out false or is owned by the kit sub-issues is
listed at the bottom so nobody re-litigates it.

String results render as quoted JSON. Registry subcall results are JSON.stringify-ed, so a string
result arrives as "shipped-42" — quotes and escapes included — and the card's code view renders that raw
text instead of the value. Especially bad for multiline output. The existing test fixture supplies an
unquoted string, which is not the real wire shape and is why this was never caught; fix the fixture in the
same change or the regression stays invisible.

Utility classes in packages/core/src/cards.tsx produce no CSS. The embed's UnoCSS content glob matches
src/cards/** only, but the cards entry is the sibling file src/cards.tsx. Latent today — that file is a
pure re-export with no classes — so this is about closing the trap, not fixing a visible bug.

Testkit approval pump can hang a run. call-tool.ts does not pass the abort signal to
rpc.chat.permissionDecision, so a stalled approval leaves the cleanup await parked forever — a hung test
run rather than a failed one. Separately, the pump promise has no rejection handler between creation and the
finally that attaches one, so a rejection in that window surfaces as an unhandled rejection and fails the
whole file with an error attributable to no test.

Embed test helper leaks on failure. page-plane-host.ts disposes its RPC observer only on the success
path, so a goto/waitForFunction/subscription rejection leaks listeners and leaves a page the caller
cannot close. Cosmetic — browser.close() reclaims it — but the leaked observer emits follow-on errors that
mask the original timeout.

Test fixtures ship from the production entry point. @conciv/ui-kit-chat's main entry exports six
ELEMENT_CAPTURE_FIXTURE_* constants. They are consumed by stories in a different package, which is why
they were made public; the right shape is a dedicated subpath pointing straight at the fixtures module, not
a second aggregating file.

Two trivia: the design spec's fenced blocks need language identifiers (markdownlint MD040), and
packages/uno-preset/src/json-tree.ts uses s where the repo forbids abbreviated identifiers.

Deliberately not here

  • Error presentation and the doubled error render — kit 2/7: primitives — Chip variants, CodeBlock/DiffBlock, ErrorBlock, StatusVisual, ActionRow, CollapsibleSection, CardShell #383 (ErrorBlock is the one error presentation).
  • Collapsible tooltip loss and the self-toggling collapsible — kit 6/7: contract — delete the old form, enforce the convention, open PR 1 #387 (CollapsibleCard stops being composed
    directly). The self-toggle mechanism is worth reading before that work starts: CollapsibleCard
    chooses its shape from hasContent(body()), and children() resolves through every top-level Show in
    the body, so a body-content change flips the outer branch, disposes Collapsible.Root and remounts a
    fresh zag machine — losing user-set open state, and re-deriving defaultOpen from
    status() === 'approval'. Keep the root mounted and move the shape decision to the trigger.
  • Shadow-DOM DOM-asserting tests — kit 6/7: contract — delete the old form, enforce the convention, open PR 1 #387 (the three DOM-asserting tests are updated there). Note the
    Storybook play function is a justified exception: play functions use Testing Library's within, which
    does not traverse shadow roots, and vitest/browser's page does not exist inside the Storybook UI.
  • .fallowrc.json exclusions — rejected. ignoreDependencies is a flat package-name list with no
    path-scoping mechanism, so the requested fix is not expressible; the vite.config.ts entry mirrors the
    existing vitest.config.ts precedent for the same reason.
  • Tooltip focus on the collapsible trigger — already fixed on the branch (aebcfe2).
  • The tmpdir() harness cwd — rejected. That parameter is the server/sandbox root, where a
    host-absolute path is required; the rule it was cited against is about adapter cwd.

Acceptance criteria

  • A string tool result renders as its value, and the fixture reflects the real wire shape
  • Utility classes written in the core cards entry produce CSS in the embed bundle
  • A stalled approval cannot hang a testkit run, and a pump rejection cannot fail an unrelated file
  • The embed page-plane helper disposes its observer and closes its page on the failure path
  • Element-capture fixtures are no longer exported from the production entry, and their consumers still build
  • markdownlint passes on the spec, and no abbreviated identifier remains in the uno preset

Activity

  1. added
    ready-for-agent
    on Aug 10, 2026
  2. added
    refactor
    good first issue
    on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueready-for-agentrefactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions