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

Stacked on PR #4. After PR-C-2 merges, this rebases cleanly onto staging.

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

Verification before deletion

  • grep across canvas/src for historyHydration / activityRowToMessages / ActivityRowForHydration: only the file itself and its own test.
  • canvas/src/components/tabs/chat/index.ts barrel does not re-export historyHydration symbols. Only message-parser.ts is re-exported, which is independent.
  • message-parser.ts (the parsers historyHydration.ts wraps) stays — still load-bearing for live A2A WebSocket messages in ChatTab.tsx, AgentCommsPanel.tsx, canvas-events.ts.
  • npx tsc --noEmit -p . — clean.
  • npx vitest run src/components/tabs/242/242 green (one fewer test file than before; historyHydration.test.ts is gone).

Why now (not after a longer observation window)

The parsers historyHydration.ts depended on are still in tree via message-parser.ts. Any unforeseen live-message consumer of activityRowToMessages would have already failed at PR-C-2 merge time (TypeScript would have flagged the missing import). Removing the file itself is purely dead-code cleanup — no behavioral change.

Stack

staging
 └─ feat/rfc-2945-pr-c-2-canvas-chat-history (PR #4)
    └─ chore/rfc-2945-pr-c-3-delete-historyhydration ← THIS PR

Merge PR #4 first; this one auto-retargets to staging.

🤖 Generated with Claude Code

Stacked on PR #4. After PR-C-2 merges, this rebases cleanly onto staging. PR-C-2 migrated canvas's `loadMessagesFromDB` from `/activity` to `/chat-history`. The TS-side row-mapping helpers in `historyHydration.ts` (`activityRowToMessages`, `ActivityRowForHydration`) had **exactly one consumer** — ChatTab's `loadMessagesFromDB` — and PR-C-2 removed it. ## Verification before deletion - grep across `canvas/src` for `historyHydration` / `activityRowToMessages` / `ActivityRowForHydration`: only the file itself and its own test. - `canvas/src/components/tabs/chat/index.ts` barrel does **not** re-export historyHydration symbols. Only `message-parser.ts` is re-exported, which is independent. - `message-parser.ts` (the parsers `historyHydration.ts` wraps) **stays** — still load-bearing for live A2A WebSocket messages in `ChatTab.tsx`, `AgentCommsPanel.tsx`, `canvas-events.ts`. - `npx tsc --noEmit -p .` — clean. - `npx vitest run src/components/tabs/` — **242/242 green** (one fewer test file than before; `historyHydration.test.ts` is gone). ## Why now (not after a longer observation window) The parsers `historyHydration.ts` depended on are still in tree via `message-parser.ts`. Any unforeseen live-message consumer of `activityRowToMessages` would have already failed at PR-C-2 merge time (TypeScript would have flagged the missing import). Removing the file itself is purely dead-code cleanup — no behavioral change. ## Stack ``` staging └─ feat/rfc-2945-pr-c-2-canvas-chat-history (PR #4) └─ chore/rfc-2945-pr-c-3-delete-historyhydration ← THIS PR ``` Merge PR #4 first; this one auto-retargets to staging. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-ceo-assistant added 1 commit 2026-05-07 00:00:42 +00:00
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
707c8c5b2d
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)
hongming was assigned by claude-ceo-assistant 2026-05-07 10:29:23 +00:00
Ghost approved these changes 2026-05-07 11:38:56 +00:00
Ghost left a comment
First-time contributor

Hongming-approved (chat 2026-05-07): RFC #2945 PR-C-3 canvas/chat-server delete historyHydration.ts now stale.

Hongming-approved (chat 2026-05-07): RFC #2945 PR-C-3 canvas/chat-server delete historyHydration.ts now stale.
claude-ceo-assistant merged commit 299ef843b7 into feat/rfc-2945-pr-c-2-canvas-chat-history 2026-05-07 11:39:00 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#6
No description provided.