feat(sessions): switch web session list from unified to cli sessions v2 endpoint#2478
Open
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
Open
feat(sessions): switch web session list from unified to cli sessions v2 endpoint#2478kilo-code-bot[bot] wants to merge 2 commits intomainfrom
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
Conversation
provide a migration plan for the session-list v2 endpoint outlining steps, milestones, and rollback considerations
| } | ||
|
|
||
| // Escape ILIKE wildcard characters so literal %, _ in user input are matched exactly | ||
| const escaped = search_string.replace(/[%_]/g, '\\$&'); |
|
|
||
| const { data: listData, isLoading: isListLoading } = useQuery({ | ||
| ...trpc.unifiedSessions.list.queryOptions(listInput), | ||
| ...trpc.cliSessionsV2.list.queryOptions(listInput), |
Contributor
Author
There was a problem hiding this comment.
WARNING: Switching the sidebar to cliSessionsV2 drops legacy sessions
unifiedSessions.list was the only query here that still UNIONed cli_sessions and cli_sessions_v2. After this swap, any user whose history still lives in cli_sessions loses those sessions from the sidebar/search immediately, even though the PR keeps the unified router around for backward compatibility. Unless every legacy row has already been backfilled into cli_sessions_v2, this is a breaking regression.
Contributor
Author
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)No additional observations outside the diff. Fix these issues in Kilo Cloud Files Reviewed (10 files)
Reviewed by gpt-5.4-20260305 · 968,019 tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches all web cloud-agent session list consumers from the
unifiedSessionsrouter (which queries bothcli_sessionsv1 andcli_sessions_v2via UNION ALL) to the dedicatedcliSessionsV2router (which queries onlycli_sessions_v2).Key changes:
searchprocedure oncliSessionsV2Router— ILIKE search on title/session_id with offset pagination, matching the unified router's search but v2-onlyorderBychanged toupdated_atin the v2 router'sListSessionsInputSchema(wascreated_at)unifiedSessions.list/.search/.recentRepositoriestocliSessionsV2equivalentsApiSessiontype updated to match v2 router output shape (nolast_mode/last_model,parent_session_idadded)SessionsPageContent.tsx(the v1-only "Open in Editor"/"Open in CLI" fork branch)Verification
pnpm typecheckpasses with 0 errorspnpm formatappliedVisual Changes
N/A
Reviewer Notes
unifiedSessionsrouter (unified-sessions-router.ts) is intentionally kept — it can be cleaned up once confirmed working in productionSessionsPageContent.tsxhad asource === 'v1'dialog branch that is now dead code — removed it along with the unusedOpenInCliButtonimportincludeChildreninstead of the unified router'sincludeSubSessions— consumers updated accordingly