Skip to content

feat: add selectable outlined message layout - #84

Merged
shakkernerd merged 3 commits into
openclaw:mainfrom
ragesaq:feat/selectable-message-layout
Jul 16, 2026
Merged

shakkernerd merged 3 commits into
openclaw:mainfrom
ragesaq:feat/selectable-message-layout

Conversation

@ragesaq

@ragesaq ragesaq commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Related: #58, #60

What Problem This Solves

Users who prefer visually bounded messages cannot currently choose that presentation without carrying unrelated application changes. Agent answers also have different visual weight depending on whether they include an activity preamble.

Why This Change Was Made

This adds a device-local Message layout choice to Appearance settings. The existing standard layout remains the default; the optional Outlined chains layout gives every message a consistent boundary and joins same-turn agent activity to its final answer without changing message models, turn grouping, or server state.

AI-assisted. Authored by ragesaq and implemented with Chisel using openai/gpt-5.6-sol; an independent review pass used anthropic/claude-opus-4-8.

User Impact

Users can opt into outlined message chains and switch back instantly. The choice persists on the current device. Existing users see no change unless they select the new layout, and no code-room schema, workspace rail, migrations, or backend APIs are included.

Outlined mode follows the active board theme for fill, text color, and shadow. For right-positioned messages, Standard keeps its existing right-aligned body text while Outlined uses start-aligned text inside the bounded chain.

Evidence

Real browser proof against a local ClickClack instance with durable bot activity:

Standard default Selectable Appearance control
Standard message layout Outlined chains setting selected

Outlined chain expanded through commentary, tool, commentary, tool, and final:

Expanded outlined message chain

Current-head validation at 2c6850651ceb4e49041a32c19c896dc970c86818:

  • Node 24 pnpm check passed, including Go tests, TypeScript tests and typechecks, FakeCo tests, desktop tests, lint, formatting, and embedded asset verification.
  • pnpm build passed, and a second embedded-asset comparison produced no diff.
  • Chromium E2E passed 94/94. Focused coverage asserts preference persistence, durable activity ordering, collapse/expand behavior, equal chain sizing, timestamp gutters, board-theme surfaces, and the Standard-versus-Outlined right-positioned text invariant.
  • All five commits use ragesaq's GitHub-bound author and committer identity and retain Chisel co-author credit.
  • Local codex review --base origin/main was attempted but could not start because the installed CLI credential resolves to an invalid environment placeholder and the API returned HTTP 401. No code finding was produced.

Not tested: deployment to the shared ClickClack service. The feature is presentation-only and was exercised in the repository's real local app path with SQLite-backed messages.

Copilot AI review requested due to automatic review settings July 15, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a device-local Message layout appearance preference that allows users to switch between the default “Standard” layout and a new “Outlined chains” layout, applied via a data-message-layout attribute on <html> (bootstrapped before first paint and re-applied at mount).

Changes:

  • Introduces message-layout preference plumbing (types, load/apply/persist/init) and wires it into the Appearance settings UI.
  • Adds the outlined-chain CSS treatment for message rows + adds settings UI styles and previews.
  • Extends Playwright coverage to validate layout persistence and outlined-chain geometry/ordering behaviors.

Reviewed changes

Copilot reviewed 7 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/e2e/chat.spec.ts Extends durable agent activity test to cover outlined chain sequencing + geometry invariants.
tests/e2e/appearance.spec.ts Adds appearance test for message layout switching + persistence (localStorage + data-message-layout).
apps/web/src/styles/settings.css Adds layout-option grid + card styles for the new Message layout selector.
apps/web/src/styles/messages.css Implements the outlined-chain message layout styling via :root[data-message-layout="outlined"] ….
apps/web/src/lib/appearance.ts Adds MessageLayout preference (storage key, validators, load/apply/set, init wiring).
apps/web/src/components/settings/AppearanceSection.svelte Adds “Message layout” radiogroup UI bound to the new preference.
apps/web/src/app.html Bootstraps data-message-layout before first paint from localStorage.
apps/api/internal/webassets/dist/index.html Updates embedded web asset HTML (boot script + hashed bundle references).
apps/api/internal/webassets/dist/200.html Updates embedded web asset HTML (boot script + hashed bundle references).
apps/api/internal/webassets/dist/_app/immutable/nodes/5.DRT8LUq6.js Refreshed embedded build output.
apps/api/internal/webassets/dist/_app/immutable/nodes/4.CvNHglQf.js Refreshed embedded build output.
apps/api/internal/webassets/dist/_app/immutable/nodes/3.DW668VJZ.js Refreshed embedded build output.
apps/api/internal/webassets/dist/_app/immutable/nodes/11.BN4GCte-.js Refreshed embedded build output.
apps/api/internal/webassets/dist/_app/immutable/nodes/0.BEbUBMR7.js Refreshed embedded build output.
apps/api/internal/webassets/dist/_app/immutable/entry/app.gPfvaOx4.js Refreshed embedded build output.
Comments suppressed due to low confidence (1)

apps/web/src/lib/appearance.ts:5

  • The header comment still says "Both" preferences and implies base.css maps all prefs, but this module now manages three prefs (color mode, board theme, message layout) and message layout is styled in messages.css. This makes the file-level documentation misleading for future updates to storage keys/attributes.
// Appearance preferences: color mode, board theme, and message layout.
//
// Both are personal, device-local prefs stored in localStorage and applied as
// data attributes on <html>; base.css maps them to color-scheme and token
// overrides. An inline script in app.html applies the stored values before

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/web/src/app.html Resolved
Comment thread apps/web/src/styles/messages.css Resolved
@ragesaq
ragesaq force-pushed the feat/selectable-message-layout branch from e52047a to 2c68506 Compare July 15, 2026 17:50
@shakkernerd shakkernerd self-assigned this Jul 15, 2026
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jul 16, 2026
@clawsweeper

clawsweeper Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 15, 2026, 11:55 PM ET / July 16, 2026, 03:55 UTC.

Summary
Adds a device-local Appearance setting that preserves the standard message layout by default and offers an optional persistent outlined message-chain layout with pre-paint application, styling, proof images, and E2E coverage.

Reproducibility: not applicable. This PR proposes a new visual preference rather than reporting broken current behavior. Its screenshots and E2E coverage demonstrate the proposed result instead of reproducing a defect.

Review metrics: 3 noteworthy metrics.

  • Changed surface: 21 files: 5 UI source, 2 E2E, 3 proof, 11 embedded assets. Most of the file count is expected embedded build output, while maintained behavior is concentrated in a bounded UI and test surface.
  • Diff size: 608 additions, 113 deletions. The moderately sized change is predominantly additive and opt-in.
  • Browser validation: 94/94 Chromium E2E reported passing. The PR reports full browser-suite coverage in addition to focused persistence and message-chain assertions.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] This creates a second maintained message-layout mode and permanent user-facing setting; automated checks cannot determine whether that additional core product surface is desired.
  • [P1] The PR currently has merge conflicts with current main, so its eventual conflict resolution could change the reviewed CSS or generated assets and requires refreshed validation.

Maintainer options:

  1. Decide the mitigation before merge
    If maintainers want the option, retain the standard default and device-local architecture, resolve the current-main conflicts narrowly, then rerun the focused Appearance and chat E2E checks and capture refreshed browser proof from the resolved head.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] The assigned reviewer should decide whether the additional core Appearance mode is desired; if accepted, the contributor must resolve the current-main conflict and refresh validation rather than sending this to an autonomous repair lane.

Maintainer decision needed

  • Question: Should ClickClack add and maintain an optional outlined message-chain mode as a core device-local Appearance setting?
  • Rationale: Correctness can be assessed from the patch, but whether another persistent chat presentation mode belongs in the core settings surface requires product and UX ownership.
  • Likely owner: shakkernerd — They are the assigned reviewer and the clearest available owner to confirm or decline the new Appearance surface.
  • Options:
    • Accept the opt-in layout (recommended): Keep standard as the default, resolve the conflicts, and land outlined mode after refreshed validation.
    • Narrow the presentation change: Request a smaller visual-consistency adjustment that does not add a persistent layout selector.
    • Decline the additional mode: Keep one canonical message layout to avoid expanding the long-term settings and CSS compatibility surface.

Security
Cleared: The diff adds local UI state, CSS, tests, proof images, and rebuilt embedded assets without changing dependencies, workflows, permissions, secrets, network behavior, or executable supply-chain sources.

Review details

Best possible solution:

If maintainers want the option, retain the standard default and device-local architecture, resolve the current-main conflicts narrowly, then rerun the focused Appearance and chat E2E checks and capture refreshed browser proof from the resolved head.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR proposes a new visual preference rather than reporting broken current behavior. Its screenshots and E2E coverage demonstrate the proposed result instead of reproducing a defect.

Is this the best way to solve the issue?

Yes, conditionally: if maintainers want this product surface, extending the existing device-local Appearance pattern while preserving standard as the default is a narrow and maintainable implementation. Product acceptance and conflict resolution remain separate gates.

AGENTS.md: found, but no applicable review policy affected this item.

Codex review notes: model internal, reasoning high; reviewed against 28ca65cb2617.

Label changes

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Three after-change browser screenshots cover the default view, selectable control, and expanded outlined chain in the real local app path; the reported SQLite-backed run and browser suite provide supplemental evidence.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a backward-compatible, opt-in visual preference with limited urgency and no demonstrated regression in the default experience.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Three after-change browser screenshots cover the default view, selectable control, and expanded outlined chain in the real local app path; the reported SQLite-backed run and browser suite provide supplemental evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. Three after-change browser screenshots cover the default view, selectable control, and expanded outlined chain in the real local app path; the reported SQLite-backed run and browser suite provide supplemental evidence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Three after-change browser screenshots cover the default view, selectable control, and expanded outlined chain in the real local app path; the reported SQLite-backed run and browser suite provide supplemental evidence.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: Authored the merged Appearance themes work that established the localStorage, pre-paint document-attribute, and settings-section pattern extended here. (role: introduced appearance behavior; confidence: high; commits: 2df8f322e8b1; files: apps/web/src/lib/appearance.ts, apps/web/src/components/settings/AppearanceSection.svelte, apps/web/src/app.html)
  • jjjhenriksen: Authored the merged independent message-alignment work whose selectors and preferences must remain compatible with the outlined mode. (role: introduced adjacent message layout behavior; confidence: high; commits: 9d6ed86b397c; files: apps/web/src/styles/messages.css, tests/e2e/chat.spec.ts)
  • shakkernerd: GitHub assigned this person to the PR on July 15, 2026, making them the clearest available owner for the pending product-direction choice. (role: assigned reviewer; confidence: medium)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-16T02:56:49.172Z sha 2c68506 :: found issues before merge. :: [P2] Implement keyboard behavior for the custom radio group

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 16, 2026
ragesaq and others added 2 commits July 16, 2026 12:11
Keep the standard presentation unchanged while allowing users to opt into grouped outlined message chains from Appearance settings. Apply the device-local preference before first paint and cover persistence, message geometry, alignment, themed surfaces, and agent activity chains.

Co-authored-by: Chisel <[email protected]>
@shakkernerd
shakkernerd force-pushed the feat/selectable-message-layout branch from 2c68506 to fdae314 Compare July 16, 2026 11:16
@shakkernerd
shakkernerd force-pushed the feat/selectable-message-layout branch from fdae314 to c9e7653 Compare July 16, 2026 11:44
@shakkernerd
shakkernerd merged commit 346c80c into openclaw:main Jul 16, 2026
7 checks passed
@shakkernerd

Copy link
Copy Markdown
Contributor

Merged using rebase.

What changed after review:

  • Fixed keyboard navigation and focus behavior across Appearance radio groups.
  • Restored Standard-layout coverage for durable agent activity while retaining Outlined-chain geometry coverage.
  • Preserved the existing default presentation and kept server, API, and message-model contracts unchanged.

Verification:

  • Rebased/refreshed onto current origin/main before pushing.
  • Local validation: formatting, lint, typechecks, reproducible builds, Go tests/deadcode/coverage, desktop 13/13, and Playwright 97/97 passed.
  • Real behavior: device-local layout persistence, Standard and Outlined rendering, agent activity chaining, message alignment, and keyboard navigation were exercised.
  • Auto-review: equivalent exact-head focused review clean after accepted findings were resolved.
  • GitHub checks: Go, TypeScript, Playwright E2E, Docker Image, and Linux/macOS/Windows Desktop green.

Landed on main:

Thanks @ragesaq!

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

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants