kimi-code/apps
qer 495fe8c674
feat(web): add session search (#895)
* feat(web): add session search

Add a search box to the web sidebar that instantly filters all loaded
sessions by title and the last user prompt (case-insensitive).

Surface the last user prompt from the server: the daemon already
persisted it in session metadata, and it now flows through the session
schema into the REST response so the web client can match against it.

* fix(web): keep lastPrompt fresh on session.meta.updated

Address Codex review: the daemon emits session.meta.updated with
patch.lastPrompt whenever a new prompt is submitted, but the web
projector only forwarded the title. That left the cached session's
lastPrompt stale, so sidebar search by the latest prompt text failed
until a full reload. Forward lastPrompt through the projector and
reducer, and cover it with a pipeline test.

* refactor(web): avoid conditional spreads in meta patch

Address Codex review: per the root AGENTS.md, optional object properties
should be passed directly rather than via conditional spreads. Use nullish
coalescing so a field the event does not carry keeps its prior value.

* fix(web): stop Escape from aborting a run while search is focused

Address Codex review: ConversationPane registers a document-level keydown
that aborts the active prompt on Escape. Without handling it on the search
input, pressing Escape to dismiss the search would unexpectedly stop the
agent. Stop propagation and clear the query, matching the inline rename
inputs.

* fix(web): exclude hidden-workspace sessions from search

Address Codex review: removing a workspace only records its root in
hiddenWorkspaceRoots and leaves the sessions intact; the grouped sidebar
skips the hidden root, but sessionsForView (the search source) did not,
so a matching title or prompt could resurrect sessions from a removed
workspace. Filter sessionsForView by the visible workspace set so the
flat list matches what the grouped sidebar renders.
2026-06-18 19:23:23 +08:00
..
kimi-code feat(goal): support guided goal authoring (#839) 2026-06-18 18:48:23 +08:00
kimi-web feat(web): add session search (#895) 2026-06-18 19:23:23 +08:00
vis feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00