Skip to content

refactor: drop legacy single-session default chat path - #192

Open
EtienneLescot wants to merge 2 commits into
release/v1.8.0from
ponytail/drop-legacy-default-chat
Open

refactor: drop legacy single-session default chat path#192
EtienneLescot wants to merge 2 commits into
release/v1.8.0from
ponytail/drop-legacy-default-chat

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pure deletion + signature tightening. Drops the never-rendered "default session" chat path: the multi-session UI in LeftPanel.tsx only ever calls the session-aware chatRun, but the renderer/IPC layer still carried a 2-arg polymorphic chatRun plus three sibling channels (chat.runDefault, chat.history, chat.clear) that have no production caller.

Deletions

  • electron/ai-edition/chat-service.ts
    • export async function runChatDefault(...)
    • export function getDefaultChatHistory(...)
    • export function clearDefaultChatHistory(...)
    • Private helper getOrCreateDefaultSession(...) (only used by runChatDefault)
  • electron/native-bridge/services/aiEditionService.ts
    • runChatDefault, getDefaultChatHistory, clearDefaultChatHistory options properties
    • chatRunDefault(...), chatHistoryDefault(...), chatClearDefault(...) service methods
  • electron/ipc/nativeBridge.ts
    • runAiEditionChatDefault / getAiEditionChatHistoryDefault / clearAiEditionChatHistoryDefault fields on NativeBridgeContext
    • runChatDefault: context.runAiEditionChatDefault, ... constructor wiring
    • chat.runDefault, chat.history, chat.clear dispatch cases
  • electron/ipc/handlers.ts
    • clearDefaultChatHistory, getDefaultChatHistory, runChatDefault imports
    • runAiEditionChatDefault / getAiEditionChatHistoryDefault / clearAiEditionChatHistoryDefault context bindings
  • src/native/client.ts
    • chatRunDefault, chatHistory, chatClear properties on the aiEdition block
    • Collapsed chatRun(projectId, sessionIdOrMessage, message?, document?)chatRun(projectId, sessionId, message, document?); the message === undefined branch is gone
    • Removed now-unused AiEditionChatMessage import
  • src/native/browserShim.ts
    • chatRunDefault, chatHistory, chatClear entries (the shim's chatRun was already 3-arg, so no signature change here)

Diff stat

6 files changed, 6 insertions(+), 184 deletions(-)

Classification

  • Area: Refactor / maintenance
  • Release impact: Minor
  • Platform-specific: Not platform-specific (no native capture, IPC plumbing only)

Testing

  • npx tsc --noEmit — clean (exit 0)
  • npm run test — 1142/1144 pass; the two failures (document-service.test.ts > concurrent saves, mediaLinksRegistry.test.ts > concurrent registrations) are unrelated flaky timeouts on disk-bound concurrency tests. Both files were not modified by this PR. Re-running them in isolation: 30/30 pass.
  • npm run lint — exit 0; no new warnings (7 pre-existing warnings remain in files this PR did not touch)
  • Verified via Get-ChildItem src,electron -Recurse -File -Include *.ts,*.tsx | Select-String ... that no straggler references to runChatDefault, getDefaultChatHistory, clearDefaultChatHistory, chatRunDefault, chatHistory, chatClear, chat.runDefault, chat.history, or chat.clear remain

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f3eec9ce-b624-4b5b-8b1b-83ee769f19c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ponytail/drop-legacy-default-chat

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

EtienneLescot and others added 2 commits July 28, 2026 20:38
Every producer and handler of chat.runDefault / chat.history / chat.clear is
gone, but the request union still type-approved them — a future caller would
compile clean and fail at runtime with UNSUPPORTED_ACTION. Deleting them turns
that back into a compile error.
@EtienneLescot
EtienneLescot force-pushed the ponytail/drop-legacy-default-chat branch from 78ecf18 to 4438e3f Compare July 28, 2026 18:51
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.

2 participants