Skip to content

feat(vscode): preview display settings with a live sample session - #14346

Merged
marius-kilocode merged 7 commits into
mainfrom
prototype-ui-settings-preview
Sep 21, 2026
Merged

marius-kilocode merged 7 commits into
mainfrom
prototype-ui-settings-preview

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Display settings control how session content starts collapsed or expanded, but the effect is hard to judge from the labels alone. Reviewing a change meant leaving settings, running a session, and coming back to adjust the same options.

Why This Change Was Made

  • Adds a looping sample conversation beside the Display controls. It renders through the production message components, so reasoning, edit, terminal, and generic tool blocks look like a real session.
  • The sample uses local data only. It never runs tools, edits files, or sends model requests.
  • Playback pauses while the window is hidden, follows new content unless the user scrolls away, and keeps a fixed canvas height so the layout does not flicker.
  • Adds Review first and High autonomy presets above the affected controls. Both call the same getDisplayPreset helper that onboarding uses, so the defaults cannot drift apart.
  • Onboarding now also covers code edit and MCP tool visibility, and keeps the task timeline visible for both choices.

User Impact

  • Display options can be evaluated before saving, because the preview reacts to draft values.
  • Discard restores the previous preset and preview state.
  • The preset buttons change display options only, not permissions.
  • Onboarding and settings produce consistent display defaults, and existing custom values are preserved.

Evidence

Display settings with the live sample session preview on the right

Manual verification in an isolated VS Code instance:

  • Reasoning, edit, shell, and generic tool blocks update immediately when draft settings change.
  • Review first selects Expanded reasoning, expanded terminal and edit blocks, collapsed MCP tools, and visible approval reasons.
  • High autonomy selects Preview reasoning, collapsed terminal and edit blocks, collapsed MCP tools, and hidden approval reasons.
  • Save and Reload keep the selection, Discard reverts it, and a custom combination clears the preset highlight.
  • German and Arabic layouts render the translated strings, including RTL direction.

Automated checks from packages/kilo-vscode/: bun run compile, bun run knip, bun run check-kilocode-change, and 102 focused tests pass.

marius-kilocode and others added 3 commits September 21, 2026 11:27
Add a looping sample conversation beside the Display settings so users can
see how reasoning, edit, terminal, and generic tool blocks render with the
current options before saving.

Reuse the production message components with local sample data. Playback
pauses when hidden, follows new content unless the user scrolls away, and
keeps a fixed canvas height to avoid layout flicker.

Add Review first and High autonomy display presets to settings. They use the
same display defaults as onboarding, which now also covers code edit and MCP
tool visibility and keeps the task timeline visible.
Comment thread packages/kilo-vscode/webview-ui/src/components/settings/DisplayTab.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/components/settings/SessionPreview.tsx 211 Follow-up commit 87d9db6 added the requested Settings/DisplayPreview story (and the DisplayTab import it needs), but it also added settings--display-preview to the visual-regression SKIP set, so the new @container (min-width: 1050px) two-column layout still has no automated baseline. The skip rationale (the preview streams continuously, so captures land on an indeterminate frame) is reasonable; if a guard is still wanted, consider pausing playback for the story so it renders a deterministic frame. Non-blocking.
Files Reviewed (2 files, incremental c3f2962..87d9db6)
  • packages/kilo-vscode/tests/visual-regression.spec.ts - skip entry + comment
  • packages/kilo-vscode/webview-ui/src/stories/settings.stories.tsx - new DisplayPreview story

Fix these issues in Kilo Cloud

Previous Review Summaries (2 snapshots, latest commit c3f2962)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit c3f2962)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/components/settings/SessionPreview.tsx 211 No Storybook story or visual-regression baseline for the new Display-tab preview panel and its 1050px two-column layout. Still reproducible at c3f2962 (webview-ui/src/stories/settings.stories.tsx has no Display-tab story), so it carries forward.
Files Reviewed (2 files)
  • packages/kilo-vscode/webview-ui/src/components/settings/DisplayTab.tsx
  • packages/kilo-vscode/webview-ui/src/components/settings/SessionPreview.tsx (re-verified)

Resolved since the previous review: the DisplayTab.tsx suggestion about selected() duplicating the per-select default fallbacks is fixed by c3f2962, which extracts a shared DISPLAY_DEFAULTS constant and reads it in selected(), the auto-approval switch, and all three Selects.

Fix these issues in Kilo Cloud

Previous review (commit 2c4df4e)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2

Both findings are non-blocking suggestions. Core playback logic, preset plumbing, and state cleanup were reviewed and look correct.

Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/components/settings/DisplayTab.tsx 49 Preset selected() duplicates the per-select default fallbacks (?? "expanded" / ?? "collapsed"), so the preset highlight can silently drift if a Select default changes.
packages/kilo-vscode/webview-ui/src/components/settings/SessionPreview.tsx 211 No Storybook story or visual-regression baseline for the new Display-tab preview panel and its 1050px two-column layout.
Notes from review
  • Memory/lifecycle: the setInterval and ResizeObserver added in SessionPreview are both torn down in onCleanup, and the Show … keyed remount disposes the previous Playback, so no timer or observer leak was found.
  • previewFrame operates on a structuredClone, so the fixture is not mutated across streaming ticks.
  • New i18n keys (settings.display.preview.*, settings.display.presets.*) are present in all 21 language dictionaries.
  • code_edit_display / mcp_tool_display already exist in the config schema, and showAutoApprovalReason is a declared kilo-code.new setting.

Fix these issues in Kilo Cloud

Files Reviewed (25 files)
  • .changeset/quiet-session-preview.md
  • packages/kilo-vscode/src/kilo-provider/work-style.ts
  • packages/kilo-vscode/src/shared/work-style-presets.ts
  • packages/kilo-vscode/tests/unit/session-preview-playback.test.ts
  • packages/kilo-vscode/tests/unit/work-style-apply.test.ts
  • packages/kilo-vscode/tests/unit/work-style-presets.test.ts
  • packages/kilo-vscode/webview-ui/src/components/settings/DisplayTab.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/src/components/settings/SessionPreview.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/src/components/settings/session-preview-playback.ts
  • packages/kilo-vscode/webview-ui/src/styles/settings.css
  • packages/kilo-vscode/webview-ui/src/i18n/{ar,br,bs,da,de,en,es,fa,fr,it,ja,ko,nl,no,pl,ru,th,tr,uk,zh,zht}.ts
  • packages/kilo-docs/public/img/screenshot-tests/.../work-style-onboarding-{200,default}-chromium-linux.png

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

Preset detection repeated the per-select default fallbacks, so a default
changed in one place could silently stop a preset button from highlighting.
Define the display defaults once and read them in both the preset check and
the individual controls.
The Display tab gained a substantial preview panel with no Storybook story.
Add a full-width story that renders the real tab with its two-column layout,
and exclude it from pixel baselines because the preview plays a continuous
streaming loop that lands on an indeterminate frame.

@WebReflection WebReflection left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent is good but I am not usually happy to see setInterval around when we're dealing with a highly reactive library where signals should dictate operations, not computed values each 50ms but if there is no better way I am happy to not block this PR, although I think we should try to avoid intervals any time we could, these can be very blocky and expensive and rarely run when needed or even if needed, the guard around previewDuration also feels a bit weird ... anyway, this could land.

@marius-kilocode
marius-kilocode merged commit fcf5649 into main Sep 21, 2026
27 checks passed
@marius-kilocode
marius-kilocode deleted the prototype-ui-settings-preview branch September 21, 2026 10:24
@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

Follow-up for the interval note: #14352 replaces the 50 ms tick with requestAnimationFrame and derives the phase from the elapsed time, which also drops the end-of-loop guard and the per-cycle remount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants