Skip to content

fix: refresh session list after importing CLI sessions#11

Merged
knqiufan merged 1 commit intomainfrom
fix/issue-7
Mar 17, 2026
Merged

fix: refresh session list after importing CLI sessions#11
knqiufan merged 1 commit intomainfrom
fix/issue-7

Conversation

@knqiufan
Copy link
Owner

@knqiufan knqiufan commented Mar 17, 2026

Summary

  • Fixed session list not refreshing after importing CLI sessions from ~/.claude/projects/
  • Added chat_list.refresh() call in _on_import_complete before selecting the imported session, so the sidebar rebuilds to include the new entry

Root Cause

_on_import_complete called _on_session_select() which only invokes refresh_selection() — a lightweight method that updates the selection highlight on existing list items. It never rebuilds the list, so the newly imported session was invisible in the sidebar until the user manually triggered a refresh.

Test plan

  • All 313 existing tests pass
  • Import a CLI session → verify it appears in the sidebar immediately
  • Verify the imported session is auto-selected after import

Closes #7

🤖 Generated with Claude Code

_on_import_complete only called _on_session_select which uses
refresh_selection() — a lightweight highlight update that never
rebuilds the list. Added an explicit chat_list.refresh() call
before selecting the session so the newly imported session
appears in the sidebar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@knqiufan knqiufan merged commit cf60ae7 into main Mar 17, 2026
2 checks passed
@knqiufan knqiufan deleted the fix/issue-7 branch March 17, 2026 16:24
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.

[Import Session] Session list does not refresh after importing CLI sessions

1 participant