Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(chat): keep the inline message-edit plate readable in light theme (#517)

Lan8de6602b6af1
diff --git a/apps/desktop/src/styles/messages.css b/apps/desktop/src/styles/messages.css
index 950313d73..b9a654ed2 100644
--- a/apps/desktop/src/styles/messages.css
+++ b/apps/desktop/src/styles/messages.css
@@ -1340,8 +1340,11 @@
font-variant-numeric: tabular-nums;
}
-/* Compact composer plate: same surface and radius as the bottom composer,
- without the floating shadow. The textarea is unboxed; actions sit in a
+/* Compact in-flow editor. Outer composer shadow clips: the row uses
+ content-visibility (paint containment) and has no horizontal padding, and
+ the transcript scroller clips overflow. Separate from the pane with the
+ same 8% mix as a user bubble (`--ds-tile-deep`); focus uses an inset ring
+ so it stays inside the plate. The textarea is unboxed; actions sit in a
28px footer. */
.message-edit {
display: flex;
@@ -1350,11 +1353,15 @@
flex-direction: column;
border: 0;
border-radius: var(--ds-composer-radius, var(--radius-xl));
- background: var(--ds-bg-composer);
+ background: var(--ds-tile-deep);
box-shadow: none;
isolation: isolate;
}
+.message-edit:focus-within {
+ box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--ds-focus) 28%, transparent);
+}
+
/* A prompt being edited needs typing room, so the user column drops its
narrow chat-plate clamp for as long as the editor is open. */
.message-row.user .message-col:has(.message-edit) {
diff --git a/apps/desktop/test/transcript-style.test.mjs b/apps/desktop/test/transcript-style.test.mjs
index 174148f59..e29bfbe94 100644
--- a/apps/desktop/test/transcript-style.test.mjs
+++ b/apps/desktop/test/transcript-style.test.mjs
@@ -271,9 +271,12 @@ test("editing a user prompt regenerates it and keeps the old branch reachable",
);
assert.match(
stylesSource,
- /\.message-edit \{[\s\S]*?background:\s*var\(--ds-bg-composer\);[\s\S]*?box-shadow:\s*none;/,
+ /\.message-edit \{[\s\S]*?background:\s*var\(--ds-tile-deep\);[\s\S]*?box-shadow:\s*none;/,
+ );
+ assert.match(
+ stylesSource,
+ /\.message-edit:focus-within \{[\s\S]*?box-shadow:\s*inset/,
);
- assert.doesNotMatch(stylesSource, /\.message-edit:focus-within/);
assert.match(transcriptSource, /className="icon-btn message-edit-cancel"/);
assert.match(transcriptSource, /className="send-btn message-edit-submit"/);
});
diff --git a/docs/spec/04-ux/07-ui-design-system.md b/docs/spec/04-ux/07-ui-design-system.md
index 50086aeb0..4c0b10241 100644
--- a/docs/spec/04-ux/07-ui-design-system.md
+++ b/docs/spec/04-ux/07-ui-design-system.md
@@ -867,6 +867,10 @@ model):
hairline stroke plus the restrained `--elevation-prominent` shadow provides
separation; the transcript reserves the measured dock height instead of
painting a full-width gradient veil.
+- In-transcript message-edit uses `--ds-tile-deep` and `--ds-composer-radius`
+ with no outer shadow. The row's paint containment and the transcript
+ scroller would clip a composer lift. Focus uses an inset 2px accent ring
+ so the cue stays inside the plate.
- Dark elevated shell reads as elevated-primary (`#212121f5` / gray-800 96%)
on `#181818` with standard elevation-prominent
- Starter cards use a two-column grid at workstation widths and collapse to
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index 9d2c487ff..860036bb3 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -1607,9 +1607,12 @@ Single message render — either user (plaintext) or assistant (markdown streami
selected assistant response, requires an idle source, and leaves that
source's transcript, live runtime, and provider cache state untouched (D134).
Edit belongs to the user turn: it swaps the prompt bubble for a focused
- composer-plate editor (same `--ds-bg-composer` fill and `--ds-composer-radius`
- as the bottom composer; no stroke per D297, no shadow). The textarea is
- unboxed inside that plate; localized Retry and Cancel sit in a 28px footer
+ composer-radius editor filled with `--ds-tile-deep` (the same 8% mix as a
+ user bubble) so it stays distinct from the pane without an outer shadow.
+ Transcript rows paint-contain and the scroller clips overflow, so a
+ composer lift would be cut off at the plate edges (D297: in-flow surfaces
+ use tone, not stroke). Focus paints an inset 2px accent ring. The textarea
+ is unboxed inside that plate; localized Retry and Cancel sit in a 28px footer
(Escape cancels, Cmd/Ctrl+Enter retries; slash turns seed the typed
`command` form so retrying re-expands the template). Opening it widens the
user column to the assistant reading width and hides the action toolbar.
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index fdb03a0a7..e200e5068 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -4157,7 +4157,9 @@ identify the platform validation still needed.
Copy; after the response settles, the assistant toolbar offers Copy, Fork,
Regenerate. The user toolbar offers the pager (when variants exist), Copy,
Edit, Delete. Edit replaces the prompt bubble with a wider composer-matched
- inline editor plate with Retry and Cancel controls; Escape or Cancel restores the bubble
+ inline editor plate filled with `--ds-tile-deep` (no outer shadow, inset
+ focus ring) so the light plate stays distinct from the white pane without
+ a clipped glow, with Retry and Cancel controls; Escape or Cancel restores the bubble
unchanged. Retry truncates the transcript from that prompt and streams a new
answer whether or not the text changed, leaving a `current / total` pager on
the user turn that restores the original prompt with its full answer tail in
@@ -8468,6 +8470,17 @@ This test plan spec is accepted when:
- **Milestone**: M6
- **Status**: Partially automated (`macos-sidebar-vibrancy.test.mjs` source contract); native visual verification Draft
+### US-UI-75 Light message-edit plate
+- Open a populated transcript in light and dark themes and choose Edit on a
+ user prompt.
+- Expect the inline editor to be a `--ds-tile-deep` plate at
+ `--ds-composer-radius` with no outer shadow and no hairline stroke. On
+ light theme the 8% ink wash must remain distinct from the `#ffffff` chat
+ surface; the composer glow must not appear or get clipped at the plate
+ edges. Retry and Cancel stay legible in the footer.
+- Focusing the textarea paints an inset 2px accent ring inside the plate;
+ Escape or Cancel restores the bubble.
+
#### E2E-123: asktool collects multiple answers and returns skipped placeholders
- **Preconditions**: Agent, Plan, or Goal mode; a configured provider; a