Skip to content

feat(web): preserve side panel and scope input history per session#1181

Merged
wbxl2000 merged 8 commits into
mainfrom
feat/web-per-session-panels-history
Jun 28, 2026
Merged

feat(web): preserve side panel and scope input history per session#1181
wbxl2000 merged 8 commits into
mainfrom
feat/web-per-session-panels-history

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

No related issue — these are small UX improvements to the web UI, explained below.

Problem

Two related session-scoping issues in the web UI:

  1. Open panels are lost on session switch. Switching to another session closes whatever side panel was open (thinking, agent, tool diff, side chat, etc.). Coming back to the session means reopening it by hand.
  2. Input history leaks across sessions. The composer's / input history is one global list, so prompts sent in session A show up when browsing history in session B.

What changed

  • Preserve the open side panel per session. On session switch, snapshot the leaving session's open panel (thinking / compaction / agent / tool diff / side chat) and restore it when switching back. File preview and git diff are intentionally left out — their content depends on the active session's cwd / git state and is re-fetched on demand.
  • Scope input history to the current session. Store history as Record<sessionId, string[]> (capped at 100 per session) instead of a single global list. Draft sessions (no id yet) do not record; the existing global history is migrated into the current session on first load.

Both changes are web-only and ship via the bundled CLI artifact, so the changesets list @moonshot-ai/kimi-code.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1712fcb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 28, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@1712fcb
npx https://pkg.pr.new/@moonshot-ai/kimi-code@1712fcb

commit: 1712fcb

@wbxl2000 wbxl2000 merged commit 1dab2c2 into main Jun 28, 2026
9 of 10 checks passed
@wbxl2000 wbxl2000 deleted the feat/web-per-session-panels-history branch June 28, 2026 17:52
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