Skip to content

Remove what the chat cut left behind - #597

Merged
mrviduus merged 2 commits into
mainfrom
chore/mcp-cut-leftovers
Sep 10, 2026
Merged

Remove what the chat cut left behind#597
mrviduus merged 2 commits into
mainfrom
chore/mcp-cut-leftovers

Conversation

@mrviduus

Copy link
Copy Markdown
Owner

Follow-up to #596. Inert, but exactly the residue that PR exists to remove — kept
out of it so the reviewer of a 21,000-line deletion had one thing to judge, not two.

  • apps/mobile/src/lib/sse.ts and sseParser.ts (+ its test) had no importers
    left.
    Their only caller was bookChat.ts. The web's lib/sse.ts is not
    dead and stays — useExplain still streams through it.
  • ReaderShell kept pendingCitationRef and scrollToCitation alive, plus
    the block that consumed them on WebView load. The only writer of that ref was
    the deleted handleCitation, so the ref was permanently null and the block
    could never run.
  • packages/shared/src/reader/citation.ts existed for that path only, as did
    AskCitation / AskResponse / AskTurnDto / AskTarget.
  • AskMarkdownMarkdown. The component survives — BookInsightsSection
    renders insight Markdown through it — but it was named after a feature that no
    longer exists, and its doc comment described "the renderer the Ask sheet already
    uses". Same reasoning as onStudyBuddyonAskAbout in The conversation moves to the reader's own assistant #596: a name pointing
    at something deleted is how the next reader concludes it is still there.

−466 lines. Solution builds; 369 mobile tests, web tests and tsc clean on all
three apps.

Also here: something deliberately not fixed

STATUS.md gains a note that five web modules and one stylesheet have no
importers — lib/fuzzyMatch, lib/wordAtPoint, hooks/useOfflineDownload,
hooks/useSwipe, hooks/useVocabLevel, styles/native-language-picker.css.
git grep on main says they were dead before this work too, so they are not
fallout from the cut and are not swept in with it. Two of them are listed in that
same file's hook inventory as if live.

🤖 Generated with Claude Code

https://claude.ai/code/session_011rgEMvYYi4Egj99dVtvm6E

mrviduus and others added 2 commits September 10, 2026 16:31
Inert, but exactly the residue the cut exists to remove.

apps/mobile/src/lib/sse.ts and sseParser.ts had no importers left — their only
caller was bookChat.ts. The web's lib/sse.ts is NOT dead and stays: useExplain
still streams through it.

ReaderShell kept pendingCitationRef and scrollToCitation alive, plus the block
that consumed them on WebView load. The only writer of that ref was the deleted
handleCitation, so the ref was permanently null and the block could never run.
packages/shared/src/reader/citation.ts existed for that path only, as did
AskCitation / AskResponse / AskTurnDto / AskTarget.

AskMarkdown survives — BookInsightsSection renders insight Markdown through it —
but it is named after a feature that no longer exists and its doc comment
described "the renderer the Ask sheet already uses". Renamed to Markdown, same
reasoning as onStudyBuddy → onAskAbout last week: a name pointing at something
deleted is how the next reader concludes it is still there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011rgEMvYYi4Egj99dVtvm6E
lib/fuzzyMatch, lib/wordAtPoint, hooks/useOfflineDownload, hooks/useSwipe,
hooks/useVocabLevel and styles/native-language-picker.css have no importers —
and git grep on main says they had none before the chat cut either. Recorded
rather than swept in: mixing someone else's dead code into a deletion PR is how
a reviewer loses track of what the PR actually decided.

Two of them (useSwipe, useOfflineDownload) are listed in STATUS.md's own hook
inventory as if live.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011rgEMvYYi4Egj99dVtvm6E
@mrviduus
mrviduus merged commit 7790a4c into main Sep 10, 2026
10 checks passed
@mrviduus
mrviduus deleted the chore/mcp-cut-leftovers branch September 10, 2026 21:35
mrviduus added a commit that referenced this pull request Sep 11, 2026
Verified: every name in that list has zero references and the files do not exist —
it was removed in #597. A to-do pointing at deleted files sends the next reader
chasing nothing, which is how the Play deadline in this same file misled an agent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011rgEMvYYi4Egj99dVtvm6E
mrviduus added a commit that referenced this pull request Sep 11, 2026
* feat(insights): a date on each conclusion, and no category enum

The categories were dropped before they were built. Three independent readings of
the code disagreed about them and converged on one question for the owner: coming
back in a month, do you open one book or all of them? The answer was one book —
and per-book retrieval is already served by a chapter label and reading order.
No column, no migration, no tabs.

What the panel was actually missing is a date. A конспект is read months later,
and without one it cannot answer "is this what I thought then, or what I think
now". A re-run replaces the row and moves updatedAt, so this is the age of the
current text, not of the conversation that started it.

Absolute, not relative: "3 days ago" is the register of a shelf in progress, and
by the time this matters the answer is months. ISO because the shared package
holds no locale and the value must not shift a day between devices.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011rgEMvYYi4Egj99dVtvm6E

* docs(handoff): the leftover chat plumbing is gone, not pending

Verified: every name in that list has zero references and the files do not exist —
it was removed in #597. A to-do pointing at deleted files sends the next reader
chasing nothing, which is how the Play deadline in this same file misled an agent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011rgEMvYYi4Egj99dVtvm6E

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to 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