feat(canvas): extractReplyText + deriveProvidersFromModels test coverage + extractMessageText bug fix #874

Closed
fullstack-engineer wants to merge 2 commits from feat/canvas-test-coverage-738 into staging

2 Commits

Author SHA1 Message Date
devops-engineer
79b9d6e3ff ci: trigger CI run [skip review]
Some checks are pending
sop-checklist / all-items-acked (pull_request) Injected tier:low/auto-pass
Block internal-flavored paths / Block forbidden paths (pull_request) Waiting to run
CI / Detect changes (pull_request) Waiting to run
CI / Platform (Go) (pull_request) Blocked by required conditions
CI / Canvas (Next.js) (pull_request) Blocked by required conditions
CI / Shellcheck (E2E scripts) (pull_request) Blocked by required conditions
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
CI / Python Lint & Test (pull_request) Blocked by required conditions
CI / all-required (pull_request) Blocked by required conditions
E2E API Smoke Test / detect-changes (pull_request) Waiting to run
E2E API Smoke Test / E2E API Smoke Test (pull_request) Blocked by required conditions
Handlers Postgres Integration / detect-changes (pull_request) Waiting to run
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Blocked by required conditions
Harness Replays / detect-changes (pull_request) Waiting to run
Harness Replays / Harness Replays (pull_request) Blocked by required conditions
lint-required-no-paths / lint-required-no-paths (pull_request) Waiting to run
Runtime PR-Built Compatibility / detect-changes (pull_request) Waiting to run
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Blocked by required conditions
Secret scan / Scan diff for credential-shaped strings (pull_request) Waiting to run
gate-check-v3 / gate-check (pull_request) Waiting to run
qa-review / approved (pull_request) Waiting to run
security-review / approved (pull_request) Waiting to run
sop-checklist-gate / gate (pull_request) Waiting to run
sop-tier-check / tier-check (pull_request) Waiting to run
2026-05-13 19:42:43 +00:00
96d1ad6268 feat(canvas): extractReplyText + deriveProvidersFromModels test coverage + extractMessageText bug fix
All checks were successful
sop-checklist / all-items-acked (pull_request) Injected tier:low/auto-pass
- Export extractReplyText from ChatTab.tsx and deriveProvidersFromModels
  from ConfigTab.tsx for direct unit testing.
- extractReplyText.test.ts: 14 cases covering null/undefined, empty result,
  single/multiple text parts, mixed parts, artifacts extraction, concatenated
  parts+artifacts.
- deriveProvidersFromModels.test.ts: 9 cases covering colon/slash slug
  extraction, deduplication, empty list, bare slugs, no-id, mixed separators.
- extractMessageText bug fix (ConversationTraceModal.tsx): when result.parts
  has an explicit text field (including empty string), return it directly
  without falling through to root.text.  Previously if(p.text) treated ""
  as falsy and fell through.  Added 3 new test cases for the corrected
  behavior.
- FilesToolbar.test.tsx: +8 cases — always-visible Export/Refresh buttons,
  onUpload FileList callback, Upload button click, file count edge values,
  directory select option count.
- Spinner.test.tsx: add afterEach(cleanup) + getSvgClass helper.

Closes #738

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 19:34:26 +00:00