The kilocode_change annotation CI check (introduced in #8531) only
recognized // style comments. TSX files require {/* */} syntax inside
JSX templates, causing false failures for any PR adding Kilo-specific
JSX in packages/opencode/ — specifically reported in #6966.
Covers:
- MARKER_PREFIX regex matching both // and {/* */} styles
- Updated all 5 regex locations (whole-file, block-start/end, inline, self-exclusion)
- JSX/TSX examples in error output and AGENTS.md
- Test suite in packages/script/tests/ (98 tests across 6 describe blocks)
Test results: 98 pass, 0 fail, 107 expect() calls
The annotation check script only recognized // style comments but TSX
files require {/* */} syntax inside JSX templates. This caused false
failures for PRs adding JSX-annotated markers in packages/opencode/.
When a worktree was deleted, its sessions had worktreeId set to null but
were never removed from agent-manager.json. These orphaned sessions were
invisible in the UI and could never be reassigned, causing the file to
grow unboundedly (170+ entries with only 8 active worktrees).
- removeWorktree() now deletes sessions from state instead of nullifying
- load() skips orphaned sessions during deserialization (one-time cleanup)
- validate() also prunes orphaned sessions for completeness
Adds a copy icon button in the Calculated Permissions header that copies
the agent name and full permission ruleset as formatted JSON to the
clipboard, making it easy to share in issues or discussions.
Address review feedback from #8582:
- Key prCache by branch name instead of worktreeId so a branch switch
in the same worktree naturally cache-misses instead of returning the
previous branch's PR for up to the full TTL.
- Drop PR_LOOKUP_TTL from 60s to 10s to match the polling behavior of
comparable tools — since only the active worktree polls, this adds
at most 1 extra lookup per cycle.
Poll only the active worktree on each 15s timer tick instead of all
worktrees. Inactive worktrees refresh when selected or on manual
refresh. On first poll and visibility resume, all worktrees are fetched
once to populate badges.
Add a 60s TTL cache on PR lookup results so repeated polls skip the
expensive multi-strategy gh pr view cascade and only re-fetch checks
and comments (the fast-changing data).
With 10 worktrees this reduces API calls from ~5,000-9,800/hr to
~480-720/hr, staying well within GitHub's 5,000/hr rate limit.
The kilo-ui TextPartDisplay was missing a copy button for assistant
responses. Add one that mirrors the existing user message copy button,
shown left-aligned with minimal margin on the last text part of a
completed turn.
The AgentBehaviourTab now uses session.allAgents() but the story mocks
only provided agents(), causing 'Cannot read properties of undefined
(reading length)' errors in storybook.
Forward the hidden flag in the allAgents mapping so the webview can
distinguish internal modes (compaction, title, summary). Filter them
out of the Agent Behaviour settings list to prevent leaking
backend-only modes into the UI.
- Derive defaultAgentOptions from session.agents() (visible agents
only) so subagents/hidden agents cannot be selected as default_agent
- Add i18n translations for the new permissions UI to all 18 locale
files (ar, br, bs, da, de, es, fr, ja, ko, nl, no, pl, ru, th, tr,
uk, zh, zht)
Show the resolved permission ruleset for each agent in the Agent
Behaviour settings tab. The section is collapsed by default and
expands to show an effective-action summary plus the full ordered
rule table (last match wins).
Changes:
- Forward all agents (including subagents) with their CLI-calculated
permission rulesets to the webview via a new allAgents field
- Add collapsible PermissionRuleset component in ModeEditView
- Show subagents in the Agent Behaviour agent list with a badge
- Add PermissionRuleItem type mirroring the backend PermissionNext.Rule
Ref: https://github.com/Kilo-Org/kilocode/issues/8331
Implement collapsible, color-coded sections in the Agent Manager sidebar.
Sections can be created, renamed, colored, deleted, and reordered via
Move Up/Down context menu. Worktrees are assigned via context menu or
drag-and-drop onto section headers.
- Section CRUD in WorktreeStateManager with JSON persistence
- worktreeOrder normalization on load (backfills missing section IDs)
- setWorktreeOrder filters to top-level only (sections + ungrouped worktrees)
- moveSection operates on visible top-level model, not raw array
- createDroppable sections as worktree drop targets
- sectionAwareDetector skips home section for within-section reorder
- Multi-version worktree groups move together
- Auto-rename on creation with double-rAF focus
- 76 tests (26 state manager + 15 helpers + 35 arch)
The /local-review command used git diff base...HEAD (triple-dot) which only
captured committed changes. The diff viewer uses merge-base + two-dot diff
against the working tree. This mismatch caused /local-review to show
'nothing to review' when changes were uncommitted.
Now computes merge-base explicitly and diffs the working tree against it,
matching WorktreeDiff behavior. Also includes untracked files.
Add AbortController to GitOps that kills in-flight child processes when
dispose() is called. Thread the abort signal through both simple-git and
child_process.spawn so spawned git processes are terminated immediately
on Windows (TerminateProcess) and Unix (SIGTERM).
Wire gitOps.dispose() into all three owners: DiffViewerProvider,
AgentManagerProvider, and KiloProvider.
Move word-boundary matching logic from ModelSelector.tsx into
webview-ui/src/utils/search-match.ts with 37 unit tests ported from
the legacy word-boundary-fzf.ts test suite.
Port the word-boundary matching algorithm from the legacy word-boundary-fzf.ts.
This splits text at camelCase transitions and delimiters, so 'clso' matches
'Claude Sonnet' (Cl+So) and multi-word queries like 'gpt 5' require each
fragment to match independently.