Skip to content

fix(web-ui): make the kiro session picker load from metadata only - #413

Merged
ShotaroKataoka merged 1 commit into
mainfrom
fix/session-picker-speed
Sep 30, 2026
Merged

ShotaroKataoka merged 1 commit into
mainfrom
fix/session-picker-speed

Conversation

@ShotaroKataoka

Copy link
Copy Markdown
Contributor

Summary

The Local-mode "Continue from a kiro session" picker parsed every .jsonl log under
~/.kiro/sessions/cli in full on each open, only to count prompts. On a real store
(655 sessions, 3.7 GB, largest log 354 MB) listSessions() took ~100 s; it now takes
~0.09 s with identical groups / recent results.

  • Build the list from .json metadata only; drop messageCount from
    KiroSessionSummary, the picker row and the fork progress card (unused i18n keys
    sessionPicker.messages / forkProgress.sessionMeta removed from en + ja)
  • Read a log only when the stored title is empty (60 of 655 locally), stopping at the
    first prompt — listing no longer scales with log size, and depends far less on
    kiro-cli's undocumented log format
  • Picker dialog is now a height-capped flex column (DialogContent defaults to grid,
    so the list's flex-1 overflow-y-auto never applied and "Show all" was clipped)

Testing

  • New unit tests: titled sessions never open the log; title fallback skips malformed /
    non-prompt lines and stops at the first prompt
  • npx eslint src/ --quiet, npx tsc --noEmit, npm test (359 passed), npm run build:cloud
  • en/ja key parity check, ash scan --mode local --fail-on-findings (passed)
  • Manual: npm run dev:local — /api/agent/sessions 0.29 s warm, ?all=1 0.21 s;
    "Show all" list scrolls

listSessions() parsed every .jsonl log under ~/.kiro/sessions/cli in full on
each picker open, only to count prompts. On a 655-session / 3.7 GB store that
took ~100 s; building the list from .json metadata takes ~0.09 s.

- Drop messageCount from KiroSessionSummary and the picker / fork card
- Read a log only when the stored title is empty, stopping at the first prompt
- Make the picker dialog a height-capped flex column so "Show all" scrolls
@ShotaroKataoka ShotaroKataoka added the blog:skip ブログ対象外 label Sep 29, 2026
@ShotaroKataoka
ShotaroKataoka merged commit 5922df7 into main Sep 30, 2026
16 checks passed
@ShotaroKataoka
ShotaroKataoka deleted the fix/session-picker-speed branch September 30, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blog:skip ブログ対象外

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant