Skip to content

fix(ux): gloss source strength in answer copy-text (P4b) - #253

Merged
BigSimmo merged 1 commit into
mainfrom
claude/copy-text-source-strength
Jul 3, 2026
Merged

fix(ux): gloss source strength in answer copy-text (P4b)#253
BigSimmo merged 1 commit into
mainfrom
claude/copy-text-source-strength

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

Small, self-contained UX fix (Stage 1 provenance quick-win P4b). The copy/paste answer block emitted the bare enum — ... | strong support | ..., and for unrated sources ... | none support | ... (grammatically odd) — with no plain-English cue about match quality. This glosses it into a clinician-readable phrase.

  • New describeSourceStrengthForCopy: strong → "strong match", moderate → "moderate match", limited → "limited match", none → "match strength not rated".
  • formatAnswerRenderCopyText now renders the glossed phrase instead of ${sourceStrength} support.

Copy-text only — no retrieval, ranking, or answer-generation behavior changes.

Verification

  • npm run verify:cheap (996 passed / lint + typecheck clean)
  • npm run format:check (changed files prettier-clean)
  • eval:retrieval:quality — n/a: does not touch retrieval/ranking/selection/chunking/scoring
  • eval:rag / eval:quality — n/a: does not touch answer generation or post-processing (copy-text formatting only)
  • check:production-readiness — n/a: no clinical workflow / env / Supabase / source-governance behavior changed

Clinical Governance Preflight

  • Source-backed claims still require linked source verification — unchanged; this makes the pasted source-strength cue clearer, not weaker
  • No patient-identifiable workflow introduced or expanded
  • Supabase target unchanged (Clinical KB Database)
  • Service-role / private access unchanged
  • Demo/synthetic separation unchanged
  • Source metadata / review-status / outdated behavior unchanged
  • No clinical decision-support behavior changed → no TGA SaMD impact

🤖 Generated with Claude Code

The copy/paste answer block emitted the bare enum ("strong"/"moderate"/"limited"/"none" support),
which reads oddly ("none support") and gives no plain-English cue about how well each source
matched. Add describeSourceStrengthForCopy to gloss it into a clinician-readable phrase
(strong match / moderate match / limited match / match strength not rated) so pasted clinical
drafts carry interpretable source strength.
Copy-text only — no retrieval or answer-generation behavior changes. verify:cheap green (996);
new unit tests cover the gloss and the rendered copy block.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 3, 2026 15:15
@BigSimmo
BigSimmo merged commit 5b35eb0 into mainJul 3, 2026
4 checks passed
@BigSimmo
BigSimmo deleted the claude/copy-text-source-strength branch July 4, 2026 06:23
BigSimmo pushed a commit that referenced this pull request Aug 7, 2026
…d-end reachability
The roving-tabIndex implementation landed in 17d7ba6 with no test coverage, so
the contract it added could regress silently. Adds DOM coverage that fails
without it: one tab stop per group, Arrow/Home/End moving focus and selection,
wrap staying inside a dimension, the checked placeholder as the tab stop, and
the fallback when `value` matches no option. Verified by mutation — removing the
roving tabIndex and the key handler fails exactly these three. Adds the same
assertions as Chromium coverage in ui-accessibility, because jsdom cannot vouch
for focus behaviour under the sheet's real focus trap.
Dead ends now sit on the arrow path but are never selected by it. Previously
they were excluded from both the arrow cycle and the tab order, so a
keyboard-only reader could not reach the option or hear its "Not selectable from
here" note — while the comment claimed they stayed Tab-reachable, which
`tabIndex={-1}` denies. Moving focus without committing selection is the ARIA
guidance for a disabled radio and is the only arrangement that keeps the single
tab stop the role requires; giving dead ends `tabIndex={0}` would restore
reachability by adding a tab stop per option to a control whose point is having
one. No call site produces a dead end today, so this path is defensive and is
asserted rather than assumed.
Also corrects two records against the code: `#253` claimed the sheet inherits
native radio semantics, when it is a bespoke roving handler over buttons, and
its execution-queue row still asked for a `#1606` hand-merge that the deletion
of MobileResultFilterControl made impossible. Disambiguates the six-versus-seven
count — six band modes shipped a select, plus the tools launcher, which carries
no band.
Removes `activeResultFilterCount`, which no caller ever used.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013mcqh46SDdiR5KxScihkFQ
BigSimmo pushed a commit that referenced this pull request Aug 7, 2026
Resolved docs/outstanding-issues.md conflict by keeping both sides'
resolutions (#167, #247, #255 resolved; both removed from the open
queue) and taking main's newer #253 text (reflects #247's resolution).
Fixed TS errors surfaced by the merged main tsconfig: NODE_ENV missing
from partial env objects in check-playwright-browser-revision.test.ts
and verify-phone-chrome.test.ts, and a non-const shard array losing
its literal type in playwright-pr-shards.test.ts.
BigSimmo added a commit that referenced this pull request Aug 13, 2026
… queue text (#1890)
* docs(issues): retire 22 non-actionable ledger rows and correct the #231 queue text
A yield review of all 114 open rows against current main. The queue had become
roughly 60 tasks and 50 notes; this removes the notes and fixes two places where
the ledger was actively misdirecting.
The correction that matters most: the recommended-queue entry for #231, the top
clinical P1, told every session to "measure and fix the fast-route budget /
generation timeout" — an approach #231's own detail records as tested and
rejected, because the decisive 40-second probe completed generation in 25.272s
with route_deadline_exceeded=false and still failed quality. The session-start
hook prints the queue, not the row, so the refuted text was the text agents read.
Closed 22 rows:
- #304 was already done on main (commit d182844 refreshed the ranking
snapshot; generatedAt is 0 days old, not 2026-07-20), yet sat in the queue
advertising a freshness fuse that is not armed.
- #241#244#272#294#300#257 were standing cautions whose own text says
"no action". Each one's knowledge now lives in the code it protects, so
closing the row loses nothing.
- #196-#200 are five steps of the disaster-recovery checklist that is
canonical in docs/operator-backlog.md, with no trigger until a restore.
- #86#188 were index rows over children that are individually findable.
- #250#253#254 were superseded; #250 and #253 say so themselves.
- #156#301#152#236#260 merged into #168, #292 and #169 respectively —
each pair or group was one problem recorded two to four times.
Demoted 20 rows with a stated reason (premature ops for a single-user
prototype, upstream-blocked, measurement-gated, or design-system adoption
competing with an open clinical P1). The Pri cell is unchanged because the
writer has no --pri flag — which is now #313.
Added three rows for mechanism gaps this sweep exposed: rows outliving their
own completion (#312), the missing --pri flag (#313), and the queue being able
to contradict the row it cites with no guard (#314).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DuYJz8hauCsCdx8r4fXiZU
* docs(ledger): record the ledger yield review handoff
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DuYJz8hauCsCdx8r4fXiZU
* Keep recovery work visible and pin forced colors
---------
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto 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

@BigSimmo