Skip to content

ui-react: show taint indicators and per-trigger Mark as safe controls in chat history #3605

Closed

Description

@schlessera

Out of scope

No assistant-authored safety narration, tooltip-contained interactive controls, inferred tool attribution or verification claim for a human safe verdict. Standing-rule choices appear only when the later persistent-trust capability is available.

Current delivery qualification

Qualified on 2026-11-14.

#3662 is delivered as c82e30ae46cbd0815963147a73059fd6c476541c. Its original main run 43597810774 remains failed and retained. Declared test-only recovery #3999 merged as faa480e8c864d547cd8b4eb75965b7d609284770; its recovery run 43604089570 passed after a diagnosed artifact-upload infrastructure retry, without relabeling the original failed executions.

Fresh automatic main run 43612181306 at 03805baf5c0dc22e8dbd991956039c61b53641d0 passed all 17 selected jobs. All actual job checkouts are independently verified. Its plan explicitly included #3993's expanded layout/endurance failure set; the coordinator cleared the red-main record. Both layout shards and endurance pass. Four installed-backend history suites pass all 35 cases; four healthy native backend/UID cells and the separate intended negative control pass. Current pinned browser proof passes all eight safety-review cases, including 320/1280 light/dark touch, keyboard/focus and A/B/C recovery. Current component proof passes 12 client/reviewer cases, with the earlier exact-entry join controls retained at their unchanged source identity.

All seven original criteria are fulfilled and retained verbatim below. The delivered PR, recovery and this issue retain release milestone 0.45.0. #3993 is resolved by its qualified recovery; no merged branch received another push.

Context

Source anchors below refer to the current #3662 candidate at 821569a3fdf5beb129da5fe86712478906a47a1c; required delivery qualification remains below.

Part of #3596.

MessageBubble (packages/ui-react/src/components/chat/message-bubble.tsx:87) and ToolCallTimeline (packages/ui-react/src/components/chat/tool-call-timeline.tsx:44) render the relevant entries. ICONS (packages/ui-kit/src/primitives/Icon.tsx:135) supplies policy/ShieldAlert, secure/ShieldCheck and unverified/CircleHelp. The host now provides bounded authenticated safety-history sidecars (#3604) and password-owner two-phase individual review (#3603). createSafetyStore (packages/ui-react/src/stores/safety-state.ts:14) retains the authoritative aggregate independently of paginated detail; createSafetyClient (packages/ui-react/src/lib/safety-client.ts:5) handles read snapshots/subscriptions but has no review mutation UI.

Read docs/plans/reviewable-session-safety.md (Settings and transcript interaction) and docs/decisions/session-safety-reviews.md, which record the reviewed design and requested review disposition. ROADMAP.md “What binds future work”, the provider-history decision and G6 apply.

The collector currently keys its internal operations by the SDK tool-use identity but assigns a separate host operation UUID (createSafetyCollector, packages/ui-server/src/governance/safety-collector.ts:11). That UUID alone cannot identify the displayed tool. Persist and serve an explicit host-owned correlation when provable; never infer it from names, arguments, timestamps or adjacency. Opaque traffic retains its named turn-event fallback. Any correlation contract must retain bounded storage, pruning/deletion semantics and mixed-version negotiation; old readers must continue receiving their supported sidecar shape. No sidecar or review receipt enters provider history.

Scope

  • Render host-owned safety evidence in live and restored history with exact entry correlation, honest turn-level fallback, multi-trigger counts and collapsed-run summary indicators.
  • Provide shield-alert unresolved, shield-check Marked safe by you and unknown-evidence states; hover/focus shows short reason, tap/click/keyboard opens persistent actionable details.
  • Wire Mark as safe scope review, pending/error/partial/safe receipts and remaining-trigger state across devices without editing provider-facing messages.

Acceptance criteria

  • Every authoritative trigger has an indicator on its actual affected entry; opaque uncorrelated traffic gets its own named turn event rather than blaming a nearby message.
  • Reason, time, provenance, verdict and remaining restrictions are available by hover, keyboard focus and tap; actions are not hidden inside a tooltip.
  • Each icon has a 44px reachable button, state/count accessible name, expanded state, Escape/outside dismissal and focus return; icons/text distinguish states without color.
  • After reviewing A, its historical indicator remains inspectable as Marked safe by you; B/C and their counts remain unresolved. Only complete zero-unresolved evidence prints Normal policy restored.
  • Reload, duplicated frames, stale tabs, pagination, first-turn identity binding, auth loss and history deletion preserve the host's verdict and never replay a grant.
  • While input is still arriving, the indicator explains why Mark as safe is unavailable. The narrow choice is labeled Only this trigger, avoiding an operation-wide promise.
  • The safe shield explicitly means Marked safe by you and preserves the original event; it does not claim malware verification or removal of content from the model context.

Verification

Pinned 320px/desktop dark/light browser checks for hover/focus/tap, collapsed runs, long targets, Only this trigger and unavailable broader choices; live/replay/reconnect, owner loss, open exposure and durable-failure fixtures.

Every behavioral implementation needs meaningful failing-first/mutation receipts and the relevant real runtime/browser proof. Run contribution preflight before opening a PR; missing/cancelled selected hosted proof is not green. No tests may require an API key or external network.

Contract impact

Implement the reviewed optional schema/API/history additions and the relevant effective-taint behavior. Update integration contracts and API reports in the same implementing commit with CONTRACT metadata and a minor changeset. The G6 default/coverage and effective-state semantic break follows the recorded breaking-before-1.0 ruling and breaking label; preserve mixed-version fallback.

Readiness refresh 2026-11-07 at main 1619741f291f525d17cde4970a5ada40644117c1: #3603 and #3604 are merged; source anchors, approved plan/ADR, read/review capabilities and the missing tool correlation were verified. All seven original acceptance criteria remain verbatim. Complete #3603 candidate proof is qualified; automatic-main verification remains tracked separately. No new design or policy ruling is required.

Proof sequencing update 2026-11-11: reopened #3662 is refreshed at e21f23b620d9829e0a1228644302506036dba5db over 4a8c43f383ffd9806e5bedd1e4e00d2400f03149, preserving its chat safety UI alongside account-bound history, worker cleanup and current service/persona/Start-card voice behavior. The sole conflict in docs/http-api.md retains both opt-in entry correlation and account authorization with login-bound cursors. Fresh exact-head proof passes 557 tests / 3039 assertions / 34 files, strict typecheck at repository CI's 6144 MiB setting, the thirteen-package build and API reports regenerated unchanged. Fresh pinned offline Chromium passes 102 cases / four files on this exact committed head/tree, with zero unhandled errors. Exact-head preflight passes all five gates with 1017 tests / 6639 assertions / 42 files. Twenty-nine contribution inputs are unchanged; eleven shared API/contract/host inputs change through main, with prior mutation and browser receipts retaining their actual execution identities. #3725/#3726 still requires qualified delivery before this branch refreshes over that fix and requests its own complete candidate/main/native/provider-history proof. All seven criteria remain verbatim; Refs keeps this issue open until successful delivery.

Reopening update 2026-11-11: the existing #3662 was reopened after source verification that main 4a8c43f383ffd9806e5bedd1e4e00d2400f03149 lacks the chat safety indicator and per-trigger review UI. The same implementation branch is retained, with no replacement PR. It remains draft; its current refresh and remaining qualification are described above. All seven acceptance criteria remain unchanged.

Refresh update 2026-11-11: #3725/#3726 has qualified delivery through its original candidate and distinct #3980 recovery main run 43012208838; all five blocker criteria are complete and #3725 is closed. Removed the three satisfied active blocker declarations. #3977 merged as 3c44ac6fc56d27675dadaf38a16254db53c39f69; its exact-candidate proof passes all eight selected jobs, three client cases and 35 actual provider-history cases, while its own main run 43020467075 remains in verification. Draft #3662 is refreshed and pushed at 9fc0e02ddf4810c2a2122870bd015f8e1325e98d on that source, with its actual merge parents/tree verified. Thirty-eight contribution inputs are unchanged. The safety-client conflict preserves both exact test sets, and all five combined cases pass. Strict typecheck and all five preflight gates pass, including 1017 fast-invariant tests / 6639 assertions. The expanded local run retains 602 passing cases and four provider-history startup failures before prefix assertions (Pi namespace refusal; Claude subprocess exit 1). Those failures remain unqualified; exact hosted candidate/native/both-provider-history and every selected automatic-main category remain required. All seven original acceptance criteria remain verbatim. Refs keeps this issue open through required delivery proof.

Qualification update 2026-11-11: #3811/#3977 now has complete candidate, actual squash and automatic-main delivery proof. Its main run 43020467075 passed all 17 selected jobs, with actual checkouts, 35 provider-history cases, three safety-client cases and four healthy native cells independently verified. Current main has advanced to 8ce26e65f3d6af77ebf679c4dbfdcd29172c8222 through voice accessibility #3971 and test-health #3979. #3662 is refreshed and pushed at 8ed8db6775415506d85c98cffc71169aefbeb85a, with actual synthetic merge parents/tree verified. All 39 contribution inputs remain unchanged and the merge has no conflict. Fresh focused proof passes 602 tests / 3345 assertions / 37 files; strict typecheck and all five preflight gates pass, with 1017 fast-invariant tests / 6640 assertions. Prior local provider-capture startup failures remain retained at their original identity; this head needs actual selected hosted provider-history/native proof. Ordinary exact-candidate confirmation is the next step, followed by actual squash/main qualification. All seven original criteria remain verbatim; Refs retains this issue through delivery.

Refresh update 2026-11-12: current main 95a68ef664af65a2cde2b7aeaf8c0a4a02564f0a adds #3968, the pinned trusted Pi web executor, changing the lockfile, API client and API reports. #3662 is refreshed at 8a95c2e01ddda53e94ba78df07d4bd1e3ef314a7; actual synthetic merge parents/tree are verified. Thirty-six contribution inputs remain unchanged; three compose the new API fields, with no conflict. A private-cache copied frozen install verifies pi-web-access 0.41.0. The thirteen-package build, strict typecheck and unchanged API regeneration pass. Fresh combined safety/executor proof passes 681 tests / 66626 assertions / 44 files, including real pinned extension execution, loopback providers, cancellation, custody and installation checks; the worker launcher is replaced in these protocol fixtures, so actual OS containment remains required separately. All five preflight gates pass with 1017 tests / 6640 assertions. GitHub left the prior required contract workflow queued with no jobs for nearly 12 hours despite active/enabled workflows, no pending deployment approval and an operational public status page. The previous helper exited before reservation/candidate request. Await the newest current-head contract result before retrying confirmation; actual selected native/provider-history/browser/main proof is still required. All seven original criteria remain verbatim; no prior failed or retained execution is relabeled.

Refresh update 2026-11-13: #3990 and #3972 are merged on main 631bbae2cd999a4ba1b5d56cdf6279668da547f2. #3662 is refreshed and pushed at ed32d676a68c360d9ac4f2aba056f008bff040ef, with actual merge 40dbb6ab2dac2870286449374b2b88fe5c496db0 and tree 76a2c57bb8cfca4bfeced5700e49b8ae50828890 independently verified. Thirty-eight contribution inputs and the lockfile are unchanged; the SDK API report composes the new internal exports without conflict. The thirteen-package build, strict typecheck, unchanged API regeneration and complete pending changeset plan pass. Fresh focused proof passes 691 tests / 66690 assertions / 47 files, including the real first-level host-executor namespace boundary. The nested boundary used by provider-history capture is unavailable locally; installed-backend captures and full native qualification remain selected hosted obligations. Preflight passes all five gates with 1017 tests / 6640 assertions / 42 files. Main is green, but #3991 currently holds the integration reservation; keep this draft until it settles, then assess live main and request ordinary exact-candidate confirmation. Previous startup failures, mutation controls and browser executions retain their original identities. All seven original criteria remain verbatim; Refs keeps this issue open through actual squash and every selected automatic-main qualification.

Refresh update 2026-11-14: #3991 merged as 9e0e73674ebca4c238b53cf950c0e5ba2621f2ae; current main d64f893b513a5a1f6cd88735730ed5b0c4a74056 also includes #3992's current-model search through host-owned auth. Both automatic-main workflow summaries pass. #3662 is refreshed and pushed at 821569a3fdf5beb129da5fe86712478906a47a1c, with actual merge d544b69875670daa98ad5f8198ce02a47110e62b and tree 2c0790a5fa5f854d4f0758bde3c4e85e2a5bd832 independently verified. Thirty-seven contribution inputs and the lockfile are byte-identical; the SDK API report and package API documentation compose the new model interface, without conflict. The thirteen-package build, strict typecheck, unchanged API regeneration and complete changeset plan pass. Expanded focused proof passes 725 tests / 66905 assertions / 52 files, adding real host-owned model/subscription and per-turn recipient/budget checks. Preflight passes all five gates with 1017 tests / 6640 assertions / 42 files. Main is green and the integration slot is free; newest-contract verification and ordinary exact-candidate confirmation are next. Earlier mutation/browser/provider-capture failures retain their original execution identities; nested captures remain unavailable locally and selected hosted native/both-provider-history/browser/actual-main proof remains required. All seven original criteria remain verbatim; Refs keeps this issue open through full delivery qualification.

Merge qualification update 2026-11-14: #3662 merged through ordinary confirmation as c82e30ae46cbd0815963147a73059fd6c476541c, with exact parent d64f893b513a5a1f6cd88735730ed5b0c4a74056 and matching tree 2c0790a5fa5f854d4f0758bde3c4e85e2a5bd832. Candidate run 43595676137 passed; all eight selected jobs' actual checkouts were independently verified as d544b69875670daa98ad5f8198ce02a47110e62b. Actual installed-backend worker JUnit reports establish all 35 provider-history cases passing across four suites (Claude 19, Pi 16). Automatic main run 43597810774 is executing the selected unit, runtime, native, browser/layout, captures and endurance proof. This issue remains open until every selected result and actual checkout is qualified. Release milestone 0.45.0 is retained. All seven original acceptance criteria remain unchanged; no post-merge source edits or merged-branch pushes were made.

Activity

  1. added
    type: featA new capability or a change in user-visible behaviour.
    area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.
    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.
    area: ui-kitThe presentational design kit: components, tokens, Storybook, visual baselines.
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.
    breakingBreaks a published API or documented behaviour. Needs a maintainer ruling before code.
    on Nov 5, 2026
  2. added
    securityAuth, isolation, egress, secrets, or anything in the threat model.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    on Nov 5, 2026
  3. schlessera commented on Nov 7, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #3603, #3604 are closed, so scripts/sync-project.ts is removing the blocked label.

  4. removed
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 7, 2026
  5. self-assigned this
    on Nov 7, 2026
  6. schlessera commented on Nov 7, 2026

    @schlessera
    OwnerAuthor

    Continuing #3596 with #3605 after the owner-review and history foundations merged. Claim token: safety-3605-chat-parent-20261107; intended branch: feat/3605-chat-safety-20261107.

    Readiness was refreshed against main 1619741f291f525d17cde4970a5ada40644117c1; all seven original criteria are unchanged. Explicit host correlation is required for tool indicators, with a named turn-event fallback otherwise. Existing closure collisions: #3054, #3056, #3059, #3069, #3116, #3336, #3393, #3437, #3458, #3464, #3581 and #3622. This work will preserve those slices and the provider-history boundary. #3603 automatic-main proof remains separately tracked before its claim cleanup.

  7. added
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    on Nov 7, 2026
  8. added this to the 0.45.0 milestone on Nov 7, 2026
  9. schlessera commented on Nov 7, 2026

    @schlessera
    OwnerAuthor

    Implementation checkpoint 2026-11-07: draft #3662 at 671d5611ec9b67a85b0ed8307b03d52d80dad354 retains all seven original criteria. Local proof passes: 101 focused tests / 635 assertions, seven pinned-browser scenarios at 320px/desktop in light/dark, nine intended mutation failures with restored controls, strict typecheck, fresh package build/API reports and preflight with 1,012 fast invariants / 6,586 assertions. The published candidate's thirteen new focused tests also pass. Correlation is opt-in and matches exact host turn/tool identities; opaque input remains a named turn event. Review receipts do not replace newer evidence, reconnect/reload never replay a verdict, and read-only/deleted/open-input cases remain restrictive. Complete selected candidate CI, actual provider-history/native proof and squash/main reconciliation remain required before delivery. The root claim safety-3605-chat-parent-20261107 remains active for that continuation.

  10. schlessera commented on Nov 7, 2026

    @schlessera
    OwnerAuthor

    2026-11-07 correction: #3662 is pushed at f02ebe18751a2f69b930cae1665913bdaa2a30d5. The failed 671d561 hosted run exposed fixed DOM ordinals and a real 48px reading-position change during disconnect. Last-read evidence now retains read-only geometry while pending review authority and normal-policy claims are discarded; owner changes and deletion purge the cache. Message/tool selectors preserve the original identity, order, scroll, focus and IME assertions. Local proof passes: 103 focused tests / 645 assertions, 29 real browser scenarios, eleven mutation/restored controls, strict types, build/API reports and all preflight gates (1,012 fast invariants). All seven criteria remain unchanged. Fresh full selected hosted proof, actual native/provider-history qualification and squash/main reconciliation remain required. Root claim safety-3605-chat-parent-20261107 remains active.

  11. added
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 8, 2026
  12. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #3603, #3604, #3725 are closed, so scripts/sync-project.ts is removing the blocked label.

  13. removed
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 11, 2026
  14. schlessera commented on Nov 14, 2026

    @schlessera
    OwnerAuthor

    Automatic-main qualification remains incomplete. On squash c82e30ae46cbd0815963147a73059fd6c476541c, run 43597810774, layout (2) fails recognition recognized shares bounded reading ownership in packages/ui-react/tests/browser/transcript-qualifiers-r2.offline.tsx:146. The recorded Playwright call tries to click the transcript Details button and the Chat actions subtree intercepts it.

    A targeted execution of the unchanged file in pinned offline Chromium also fails that case (7 pass, 1 fail). Its source tree is identical to the squash. An earlier local attempt stopped before tests because of the rootless Docker UID mapping; that startup failure is not counted as a reproduction.

    The test clicks the initially clipped Details stop directly, while the existing pointDetails helper first hovers the spoken turn, waits for its Details pill to appear, and then clicks it. I am testing that genuine interaction path without changing production behavior, force-clicking, raising timeouts, removing assertions or rerunning the failed hosted job. Causality is not attributed to the safety feature without further evidence.

    The candidate's eight actual job checkouts and 35 provider-history cases remain separately verified. Ten successful own-main job checkouts are verified, including runtime, host-runtime, browser, captures and endurance. Other unit/layout work is still settling; #3605 stays open until qualified recovery is complete. The red-main record currently has no open incident; any coordinator-created incident will be reused rather than duplicated.

  15. added
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    and removed
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 14, 2026
  16. schlessera commented on Nov 14, 2026

    @schlessera
    OwnerAuthor

    Delivered through #3662 (c82e30ae46cbd0815963147a73059fd6c476541c), declared recovery #3999, and fresh automatic main 43612181306 at 03805baf5c0dc22e8dbd991956039c61b53641d0. All 17 selected main jobs and their actual checkouts are verified; #3993's expanded set is green and its coordinator record is cleared. Milestone 0.45.0 is retained.

    Original criterion Completion evidence
    1. Exact affected entry or named opaque turn event Host-owned turn/tool correlation and exact occurrence joins; named network-input fallback; current browser collapsed-run cases.
    2. Reason, time, provenance, verdict and restrictions Persistent details from host facts, native touch and keyboard/focus cases; no interactive tooltip action.
    3. Reach, accessible state, dismissal and focus return All four 320/1280 light/dark cases verify 44px reach, expanded state, Escape/outside dismissal and focus return; states include icons and text.
    4. Reviewing A preserves B/C and complete-only restoration Real owner review and A/B/C cases preserve remaining triggers and the retained human verdict; complete healthy zero-trigger proof alone restores normal.
    5. Replay, paging, binding, auth loss and deletion Current client/reviewer proof, authenticated account/history proof and live/reload/reconnect/retirement browser controls preserve authority and never replay a grant; unchanged exact-entry controls retain their earlier execution identity.
    6. Open input and narrow scope Open-delivery case explains refusal; only finalized input offers Only this trigger.
    7. Human-verdict semantics Safe state says Marked safe by you, retains the event and expressly disclaims malware verification/context removal.

    Current main passes eight pinned safety-review browser cases, 12 client/reviewer component cases, all 35 actual provider-history cases, four healthy native backend/UID cells and the separate intended negative control. Original failing-first, mutation and visual-review receipts keep their original source/execution identities; the failed original main run remains failed. No public screenshot upload is claimed. All seven original criteria remain verbatim in the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-kitThe presentational design kit: components, tokens, Storybook, visual baselines.area: ui-reactReact chat/files/voice components, stores, WebSocket transport.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.breakingBreaks a published API or documented behaviour. Needs a maintainer ruling before code.contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.securityAuth, isolation, egress, secrets, or anything in the threat model.type: featA new capability or a change in user-visible behaviour.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions