fix(web): render right-aligned Markdown correctly - #135
Conversation
f79dfd4 to
4d833d9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d833d93aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 7:47 PM ET / 23:47 UTC. ClawSweeper reviewWhat this changesThe PR fixes right-aligned web-chat Markdown lists and blockquotes, adds an end-to-end regression test, and regenerates the SPA assets embedded in the Go server. Merge readinessThis PR remains necessary: current main right-aligns the Markdown container but leaves native list padding and the blockquote rule on the left. The branch narrowly mirrors those structures for non-outlined right-aligned messages and adds focused browser coverage; however, the failing Playwright E2E check needs diagnosis and a successful rerun before merge. Priority: P2 Review scores
Verification
How this fits togetherClickClack’s Svelte web client renders chat message Markdown and applies per-user alignment preferences through document data attributes. The built SPA is copied into embedded web assets, which the Go server serves from the single binary. flowchart LR
A[Chat message Markdown] --> B[Web chat renderer]
B --> C[Alignment preferences]
C --> D[Message Markdown styles]
D --> E[Browser list and quote layout]
D --> F[Web build]
F --> G[Embedded SPA assets]
G --> H[Go server delivery]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the scoped CSS and regenerated assets after the Playwright failure is resolved or shown unrelated, with the focused browser regression passing on the merge head. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: current main applies right text alignment but retains left-side list padding and blockquote decoration. The added E2E scenario provides a focused current behavior path, although this read-only review did not execute it. Is this the best way to solve the issue? Yes, conditionally: scoping the structural CSS changes to non-outlined right-aligned messages is the narrowest maintainable repair, and the E2E test covers the reported shapes. A successful rerun of the failed browser job is still needed before merge. AGENTS.md: found, but no applicable review policy affected this item. Codex review notes: model internal, reasoning high; reviewed against 4843afe2e8eb. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (25 earlier review cycles; latest 8 shown)
|
What changed
Why
Right-aligned messages applied
text-align: rightto the Markdown container but left native list and blockquote structure unchanged. Nativeoutsidelist markers therefore stayed at the far left of the message while the list text moved right, as shown in the reported screenshot.The fix uses inside list markers for the standard right-aligned layout, preserves nested list hierarchy, keeps loose-list markers attached to their first paragraph, and mirrors blockquote structure. Outlined message layout is excluded so its existing start-aligned Markdown behavior remains unchanged.
Browser proof
The proof run used a rebuilt local ClickClack server and generated right-aligned Markdown containing nested unordered and ordered lists, a loose list with multiple paragraphs, and a blockquote. Browser-observed geometry showed:
The screenshot above is attached directly to this PR description; the proof image is not part of the feature branch.
right0pxon both sides22pxinline3pxon the right and0pxon the left12pxon the right and0pxon the leftValidation
pnpm exec oxfmt --check apps/web/src/styles/messages.css tests/e2e/chat.spec.tspnpm exec oxlint apps/web/src tests/e2e/chat.spec.tspnpm typecheckpnpm --filter @clickclack/web testgit diff --checkThe focused standalone Playwright test could not launch because the local Chromium executable is not installed in the Playwright cache.