Skip to content

fix(vscode): align prompt textarea wrapping with overlay#7831

Open
sainzs wants to merge 1 commit intoKilo-Org:mainfrom
sainzs:fix/vscode-prompt-wrap-alignment
Open

fix(vscode): align prompt textarea wrapping with overlay#7831
sainzs wants to merge 1 commit intoKilo-Org:mainfrom
sainzs:fix/vscode-prompt-wrap-alignment

Conversation

@sainzs
Copy link
Copy Markdown

@sainzs sainzs commented Mar 27, 2026

Context

Fixes #7808.

The VS Code prompt input uses a transparent <textarea> for input/caret positioning and an overlaid <div> for the visible highlighted text. On Windows, these two layers could wrap text differently, which caused the caret and rendered text to drift vertically, especially after pasting larger blocks of text.

Implementation

Aligned the textarea wrapping behavior with the overlay by adding the missing properties to .prompt-input in packages/kilo-vscode/webview-ui/src/styles/chat.css:

  • white-space: pre-wrap
  • word-wrap: break-word
  • overflow-x: hidden

This keeps the change narrowly scoped to the input CSS and leaves the component structure and behavior unchanged.

Screenshots

before after
Add Windows repro screenshot from issue Add screenshot showing caret/text alignment after paste

How to Test

  1. Open the VS Code extension sidebar.
  2. Paste a long multi-line block, including long lines that need wrapping, into the prompt input.
  3. Confirm the caret position aligns with the visible text while typing, navigating, and scrolling.
  4. Repeat on Windows, where the mismatch was previously visible.

Get in Touch

Discord: add your handle here if you want maintainer follow-up there.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Mar 27, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/kilo-vscode/webview-ui/src/styles/chat.css

Reviewed by gpt-5.4-20260305 · 185,365 tokens

@sainzs
Copy link
Copy Markdown
Author

sainzs commented Mar 27, 2026

Verification update:\n\n- Installed Bun locally ()\n- Ran bun install v1.3.11 (af24e281)

Checked 1797 installs across 1968 packages (no changes) [334.00ms] at repo root\n- Ran \n- Ran [local-bin] CLI binary already present at bin/kilo (114MB). Use --force to rebuild.
�[90m@hey-api/openapi-ts v0.90.10�[39m

�[90m[Job 1] �[39m⏳ �[36mGenerating from 1 input:�[39m
�[90m[Job 1] �[39m�[36m [1] �[39m./openapi.json
�[90m[Job 1] �[39m�[32m✅ Done!�[39m Your output is in �[96m/Users/sainzs/Code/kilocode/kilocode/packages/sdk/js/src/v2/gen�[39m
src/gen/client.gen.ts 16ms (unchanged)
src/gen/client/client.gen.ts 13ms (unchanged)
src/gen/client/index.ts 1ms (unchanged)
src/gen/client/types.gen.ts 6ms (unchanged)
src/gen/client/utils.gen.ts 11ms (unchanged)
src/gen/core/auth.gen.ts 1ms (unchanged)
src/gen/core/bodySerializer.gen.ts 4ms (unchanged)
src/gen/core/params.gen.ts 3ms (unchanged)
src/gen/core/pathSerializer.gen.ts 6ms (unchanged)
src/gen/core/queryKeySerializer.gen.ts 2ms (unchanged)
src/gen/core/serverSentEvents.gen.ts 5ms (unchanged)
src/gen/core/types.gen.ts 2ms (unchanged)
src/gen/core/utils.gen.ts 2ms (unchanged)
src/gen/sdk.gen.ts 20ms (unchanged)
src/gen/types.gen.ts 30ms (unchanged)
src/v2/client.ts 18ms (unchanged)
src/v2/gen/client.gen.ts 3ms
src/v2/gen/client/client.gen.ts 12ms
src/v2/gen/client/index.ts 1ms
src/v2/gen/client/types.gen.ts 5ms
src/v2/gen/client/utils.gen.ts 12ms
src/v2/gen/core/auth.gen.ts 1ms
src/v2/gen/core/bodySerializer.gen.ts 3ms
src/v2/gen/core/params.gen.ts 4ms
src/v2/gen/core/pathSerializer.gen.ts 5ms
src/v2/gen/core/queryKeySerializer.gen.ts 2ms
src/v2/gen/core/serverSentEvents.gen.ts 5ms
src/v2/gen/core/types.gen.ts 2ms
src/v2/gen/core/utils.gen.ts 3ms
src/v2/gen/sdk.gen.ts 52ms
src/v2/gen/types.gen.ts 49ms
src/v2/index.ts 1ms (unchanged)
src/v2/server.ts 3ms (unchanged)
[watch] build started
[watch] build started
[watch] build started
[watch] build finished
[watch] build finished
[watch] build finished\n- Confirmed clean worktree after compile ()\n\nThe PR diff remains the intended CSS-only fix for #7808.

@sainzs
Copy link
Copy Markdown
Author

sainzs commented Mar 27, 2026

Verification update:

  • Installed Bun locally (bun 1.3.11)
  • Ran bun install at repo root
  • Ran bun run --cwd packages/kilo-vscode lint
  • Ran bun run --cwd packages/kilo-vscode compile
  • Confirmed clean worktree after compile (git status --short)

The PR diff remains the intended CSS-only fix for #7808.

@johnnyeric johnnyeric requested a review from markijbema April 1, 2026 12:40
@markijbema
Copy link
Copy Markdown
Contributor

can you please add actual screenshots in the pr descriptino?

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