fix(kimi-web): fix input caret and todo strikethrough (#1423)

* fix(kimi-web): keep composer caret visible when input is empty

The composer textarea coloured its empty state with `--faint`, and with no caret-color set the caret inherited that faint colour and nearly vanished until the first character was typed. Pin the caret to --color-text so it stays readable regardless of the placeholder state.

* fix(kimi-web): use currentColor for done todo strikethrough

TodoCard pinned the done-state strikethrough to --color-line-strong, which is lighter than the faint text in light theme and darker in dark theme, so the line looked washed-out and broken against the text. Drop the override so the line inherits the text colour, matching TasksPane and the design-system examples.

* fix(kimi-web): do not reserve width for hidden workspace row actions

The workspace header's more/add buttons were hidden with opacity: 0, which kept them in the flex layout and permanently reserved ~60px on the right, so the workspace name (flex:1) truncated long before the row was full. Hide them with display: none and restore display: inline-flex on hover/focus/open, so the name fills the row and only truncates once the buttons actually appear.

The same actions remain reachable via the right-click menu and the section kebab, so removing them from the tab order when hidden is acceptable.

* fix(kimi-web): keep workspace header row height stable on hover

Lock .gh-top to the sm IconButton height (26px) so revealing the hover actions no longer grows the row and nudges the path line and the groups below it. Follow-up to the display: none change: that freed the horizontal space but let the row height collapse when the buttons were hidden.

* chore: add changeset for kimi-web UI fixes

* fix(kimi-web): restore keyboard access to workspace actions

Revert the display: none change (and the min-height that accompanied it) for the workspace row's hover actions, going back to opacity-hidden buttons.

The display: none approach removed the buttons from the tab order, and the 'create in workspace' add button has no keyboard-accessible alternative in the right-click or section menus, so keyboard users lost that action. Restoring opacity keeps the buttons focusable again, at the cost of the workspace name truncating a little earlier to reserve their space.

Addresses the P2 review on PR #1423.
This commit is contained in:
liruifengv 2026-07-06 18:34:06 +08:00 committed by GitHub
parent e95fc83cc2
commit fa6d198b01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---
web: Fix an almost-invisible composer input caret and a washed-out strikethrough on completed todos.

View file

@ -1289,6 +1289,10 @@ function selectModel(modelId: string): void {
.ph {
color: var(--faint);
/* Keep the caret at the normal text colour even when the field is empty:
the empty state sets `color` to `--faint` (so the placeholder feels soft),
and an unset caret inherits that faint colour and nearly disappears. */
caret-color: var(--color-text);
flex: 1;
border: none;
outline: none;

View file

@ -57,7 +57,6 @@ function glyphStatus(status: TodoView['status']): StatusGlyphStatus {
.tc-row.s-done .tc-name {
color: var(--color-text-faint);
text-decoration: line-through;
text-decoration-color: var(--color-line-strong);
}
.tc-empty {