chore(canvas/chat): delete historyHydration.ts now that PR-C-2 migrated callers (RFC #2945 PR-C-3) #6

1 Commits

Author SHA1 Message Date
707c8c5b2d chore(canvas/chat): delete historyHydration.ts now that PR-C-2 migrated callers
All checks were successful
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
Stacked on feat/rfc-2945-pr-c-2-canvas-chat-history. After that PR
merges, this rebases cleanly onto staging.

PR-C-2 (RFC #2945) migrated canvas's loadMessagesFromDB from /activity
to the typed /chat-history endpoint. The TS-side activity-row mapping
helpers in historyHydration.ts (activityRowToMessages,
ActivityRowForHydration) had exactly one consumer — ChatTab's
loadMessagesFromDB — and PR-C-2 removed that consumer.

Verified before deletion:

  - grep across canvas/src for historyHydration / activityRowToMessages /
    ActivityRowForHydration: only the file itself and its test.
  - canvas/src/components/tabs/chat/index.ts barrel: does NOT
    re-export historyHydration symbols. Only message-parser.ts is
    re-exported (extractAgentText, extractTextsFromParts,
    extractResponseText), which is independent.
  - message-parser.ts (the parsers historyHydration.ts wraps) STAYS
    because it's still load-bearing for live A2A WebSocket messages
    in ChatTab.tsx (line ~795), AgentCommsPanel.tsx, and
    canvas-events.ts. This delete only targets the row-shape
    hydration path, which has fully moved server-side.

  - npx tsc --noEmit -p .: clean
  - npx vitest run src/components/tabs/: 242/242 green (one fewer
    test file than before, 21 vs 22, since historyHydration.test.ts
    is gone)

Why now (not after a longer observation window): the parsers in
message-parser.ts that historyHydration.ts depended on are still in
tree, so any unforeseen live-message consumer of activityRowToMessages
would have already failed at PR-C-2 merge time (TypeScript would have
flagged the missing import). Going further by removing the file
itself is purely a dead-code cleanup — no behavioral change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-06 17:00:23 -07:00