MoonshotAI / MoonshotAI/kimi-cli
Web UI: Clicking on archived sessions does not open them
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What version of Kimi Code CLI is running?
kimi, version 1.44.0
Which open platform/subscription were you using?
kimi code
Which model were you using?
kimi for coding
What platform is your computer?
macos 26.5 (Darwin 25.5.0 arm64 arm)
What issue are you seeing?
In the Web UI sidebar, clicking on an archived session does not open it. The session appears in the "Archived" collapsible section, but clicking it has no effect — the chat area remains unchanged and the session is not loaded.
Expected behavior
The archived session should open in the main chat area, loading its conversation history.
Actual behavior
Nothing happens. The session is not selected and the chat area does not update.
Root cause (from code inspection)
The bug is in web/src/App.tsx. The useEffect that validates selectedSessionId only checks the sessions array (active/non-archived sessions):
const sessionExists = sessions.some(
(s) => s.sessionId === selectedSessionId,
);
if (!sessionExists) {
selectSession(""); // clears selection
}
Because archived sessions are stored separately in archivedSessions, this check incorrectly clears the selection immediately after the user clicks an archived session.
Additionally, currentSession only searches in sessions:
const currentSession = useMemo(
() => sessions.find((session) => session.sessionId === selectedSessionId),
[sessions, selectedSessionId],
);
Suggested fix
Update sessionExists to also check archivedSessions:
const sessionExists =
sessions.some((s) => s.sessionId === selectedSessionId) ||
archivedSessions.some((s) => s.sessionId === selectedSessionId);
Update currentSession to search both arrays:
const currentSession = useMemo(
() =>
sessions.find((session) => session.sessionId === selectedSessionId) ||
archivedSessions.find((session) => session.sessionId === selectedSessionId),
[sessions, archivedSessions, selectedSessionId],
);
3. Add `archivedSessions` to the `useEffect` dependency array.
### What steps can reproduce the bug?
## Steps to reproduce
1. Start Kimi Web UI (`kimi web` or `/web` in CLI).
2. Have at least one archived session (or archive an existing one via right-click → Archive).
3. Expand the "Archived" section in the left sidebar.
4. Click on any archived session.
### What is the expected behavior?
_No response_
### Additional information
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in web/src/App.tsx and inspect the selected-session validation and currentSession lookup, then run the Kimi Web UI with kimi web or /web and reproduce the archived-session click. Done means an archived session remains selected and its conversation history loads in the chat area after clicking it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100