Skip to content

Manage Recent Sessions from the Desktop Sidebar#2746

Merged
esengine merged 2 commits into
esengine:main-v2from
SivanCola:fix/sidebar-session-management
Jun 2, 2026
Merged

Manage Recent Sessions from the Desktop Sidebar#2746
esengine merged 2 commits into
esengine:main-v2from
SivanCola:fix/sidebar-session-management

Conversation

@SivanCola
Copy link
Copy Markdown
Contributor

Summary

  • Adds inline rename and delete controls to the desktop sidebar's recent-session list.
  • Hardens desktop session rename/delete APIs so they only operate on valid .jsonl session files under the configured session directory.
  • Deletes session sidecar state together with the transcript, including title/display metadata, branch metadata, and checkpoint directories.

Root Cause

Recent sessions could only be managed from the full history drawer, even though the sidebar is the primary place users see and switch between recent conversations. The backend delete path also trusted the frontend-provided path too much and only removed part of the session's persisted sidecar state.

Technical Approach

  • Reworked sidebar session rows so the main row remains the resume target while compact action buttons appear on hover/focus.
  • Added inline rename input and two-step delete confirmation to match the existing history drawer behavior.
  • Added session path validation before rename/delete, including directory containment, .jsonl extension checks, and symlink escape rejection.
  • Extended delete cleanup to remove .meta, .ckpt, title sidecar, and display sidecar entries.

Focused Optimization Points

  • Keeps the current session protected from deletion while still allowing rename.
  • Avoids changing session filenames, preserving stable resume/checkpoint identifiers.
  • Refreshes sidebar/history data after mutations without opening the history drawer when actions originate from the sidebar.
  • Keeps controls compact and hidden until hover/focus so existing title/date scanability is preserved.

Verification

  • npm run build in desktop/frontend passed. Vite reported the existing large chunk warning.
  • go test ./... in desktop passed.
  • git diff --check passed.
  • In-app browser verification on http://127.0.0.1:5173/: sidebar rename updated the row title, delete confirmation removed the row from the recent-session list.

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 2, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ee7c0914c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/sessions.go
@esengine esengine merged commit 3c95429 into esengine:main-v2 Jun 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants