Remove the dead transcript export buttons - #122
Merged
Conversation
The two buttons in the title bar -- "Export as Markdown" and "Export as JSON" -- had been non-functional since Cortex moved into its native pywebview/WebView2 shell. Both called `<a download>` against a blob URL, which desktop.py explicitly blocks: `webview.settings["ALLOW_DOWNLOADS"] = False`, set alongside the rest of the native shell's lockdown (no devtools in production, an owned browser profile). This is deliberate hardening, not an oversight, so the fix is removal, not re-wiring the download path. Removed the whole feature rather than just the header buttons, since it was entirely single-purpose: - ExportTranscriptMenu.tsx, exportTranscript.ts, and their test all deleted - ChatStore's `activeChat`/`setActiveChat` removed -- once the header menu was gone, ChatPage's effect mirroring the active chat into the store had no remaining reader anywhere in the app; verified with a repo-wide search before removing it, not just deleting call sites and hoping - the one AppShell test asserting the export buttons render is gone with them; every other AppShell test was untouched Confirmed clean with a full repo sweep for any remaining reference to the removed module names and export button labels -- none found outside the untracked planning doc, which stays out of scope. README's "Transcript export" bullet is gone, and the workspace screenshot is regenerated: the title bar now shows only Settings, matching the app. Verified with ./scripts/check.ps1 -Tier full: 507 backend tests, 157 frontend, the full 18-test Playwright e2e suite, and a production build, all green. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The report
The two buttons in the title bar — "Export as Markdown" and "Export as JSON" — never worked and needed to come out.
Why they never worked
Both called
<a download>against a blob URL — the standard browser download pattern. Cortex doesn't run in a browser; it runs in a native pywebview/WebView2 shell, anddesktop.pyexplicitly sets:right alongside the rest of the native shell's lockdown (no devtools in production, an owned browser profile, no leaking into the system browser). That's deliberate hardening consistent with the whole app's local-first security posture — not an oversight. So the right fix is removal, not re-wiring a download path around a setting that's there on purpose.
What came out
Removed the whole feature, not just the two buttons, since it was single-purpose end to end:
ExportTranscriptMenu.tsx,exportTranscript.ts, and their test — deletedChatStore.activeChat/setActiveChat— removed. Once the header menu was gone,ChatPage's effect mirroring the active chat into the store had no remaining reader anywhere in the app. Verified with a repo-wide search before removing it, not just deleting the call site and assuming.AppShelltest asserting the export buttons render — gone with them. Every otherAppShelltest is untouched.Confirmed clean with a full repo sweep for the removed module names and button labels — nothing left outside the pre-existing untracked planning doc, which stays out of scope.
README's "Transcript export" bullet is removed, and the workspace screenshot is regenerated — the title bar now shows only Settings, matching the app.
Verification
./scripts/check.ps1 -Tier full— 9/9 green: 507 backend tests, 157 frontend, the full 18-test Playwright e2e suite, and a production build.🤖 Generated with Claude Code