Skip to content

fix: tighten spacing above sidebar file previews - #147116

Merged
steipete merged 2 commits into
mainfrom
codex/tighten-file-preview-spacing
Sep 13, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/tighten-file-preview-spacing

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes excessive empty space below the chat side-panel tabs when opening a text attachment.

User Impact

File metadata and the document preview sit 16 px closer to the tabs, while the document's reading margins stay unchanged.

Why This Change Was Made

The sidebar's 16 px top padding was stacking with the file toolbar's own spacing. Remove that outer top padding only when the sidebar contains a file toolbar.

Refresh the startup JavaScript size baseline to the independently measured main value of 355,740 B to repair an existing CI failure. The 358,400 B hard cap and the 512 B growth / 64 B build-variance allowances remain unchanged.

Evidence

  • Opened the real Markdown attachment preview in Chrome at a 480 px panel width; the toolbar moved from y=64 to y=48. Horizontal padding and document padding remained unchanged.
  • Formatting, scoped CSS lint, and git diff --check pass.
  • All 52 performance-budget tests pass. The separate local build-comparison fixture is blocked by a dangling link in the borrowed dependency installation; hosted CI runs the actual paired build comparison.
  • Independent Codex review of the complete patch: no actionable findings through P2. ClawSweeper accepted the final revision and screenshot proof.
  • Required CI passes on the final revision, including paired UI builds, the UI test shards, real-Gateway UI tests, and startup-corpus checks.

The captures below use the running Control UI with its synthetic notes.md attachment fixture. Before restores the original 16 px top padding; after uses the changed source stylesheet.

Before After
Before: extra space beneath the tabs After: compact file preview spacing

The initial CI run reproduced an existing startup-JavaScript budget failure: the base main run measures 355,740 B gzip against a 355,719 B limit; this PR run measures 355,769 B. Both contain 1,153,709 B raw startup JavaScript. The 29 B gzip difference is within the existing 64 B build-variance allowance; startup CSS is unchanged at 46,117 B.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 15:09
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 11:40 AM ET / 15:40 UTC (Revision 3).

ClawSweeper review

What this changes

Removes extra space above sidebar text-attachment previews and refreshes the measured startup JavaScript budget baseline.

Merge readiness

✅ Ready for maintainer review

The spacing improvement remains useful on current main, and the inspected screenshots demonstrate the intended result. No actionable patch defects were found; this maintainer-owned PR should remain open for the normal merge process.

Priority: P3
Reviewed head: ae55f23961d553f6637fb87710991b8d2a81af61

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct presentation change with direct visual proof and a documented budget refresh.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots of the running Control UI's synthetic Markdown attachment preview demonstrate the stylesheet's intended upward shift while preserving reader margins and controls; the baseline adjustment does not invalidate that visual proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots of the running Control UI's synthetic Markdown attachment preview demonstrate the stylesheet's intended upward shift while preserving reader margins and controls; the baseline adjustment does not invalidate that visual proof.
Evidence reviewed 7 items Introduced change and review continuity: The complete host-pinned introduction delta contains the conditional CSS rule and budget-baseline refresh. Comparing the previously reviewed head with this head shows only the baseline refresh; the earlier review reported no findings.
Scoped spacing behavior: The rule changes only top padding when a file toolbar is present. The text-attachment component renders that toolbar in compact sidebar mode; document margins and horizontal padding remain unchanged.
Current main still needs the spacing change: Fetched main retains unconditional 16 px sidebar padding. The related merged attachment-reader PR #141469 establishes the existing reader capability, not this spacing adjustment. Reading the latest-release CSS blob failed, so release-level behavior was not independently verified.
Findings None None.
Security None None.

How this fits together

The Control UI renders opened chat attachments in a sidebar with file controls and a document reader. Its stylesheet controls the spacing between the sidebar tabs, toolbar, and preview.

flowchart TD
  A[Open chat attachment] --> B[Sidebar attachment renderer]
  B --> C{File toolbar present?}
  C -->|Yes| D[Remove outer top padding]
  C -->|No| E[Keep standard padding]
  D --> F[Display controls and preview]
  E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +4, Other 0. Total +4 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 0 +4
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 2 0
Total 2 6 2 +4

Review metrics

Metric Value Why it matters
Startup budget baseline +597 B; growth allowance 512 B and build variance 64 B unchanged The refresh accepts measured integrated growth without changing the checker's allowance rules.

Technical review

Best possible solution:

Keep the spacing adjustment in the existing sidebar stylesheet and retain the measured baseline with unchanged budget allowances.

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

Not applicable as a functional defect reproduction: this is visual polish, and the supplied before/after captures directly demonstrate the spacing difference.

Is this the best way to solve the issue?

Yes. A conditional rule in the existing stylesheet addresses the extra spacing without changing the reader, other sidebar content, or stored settings.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f765199d9ca5.

Labels

Label justifications:

  • P3: This is a small visual-spacing improvement with a bounded performance-baseline refresh.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots of the running Control UI's synthetic Markdown attachment preview demonstrate the stylesheet's intended upward shift while preserving reader margins and controls; the baseline adjustment does not invalidate that visual proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots of the running Control UI's synthetic Markdown attachment preview demonstrate the stylesheet's intended upward shift while preserving reader margins and controls; the baseline adjustment does not invalidate that visual proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots of the running Control UI's synthetic Markdown attachment preview demonstrate the stylesheet's intended upward shift while preserving reader margins and controls; the baseline adjustment does not invalidate that visual proof.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-13T15:16:18.794Z sha 6400f26 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T15:25:57.836Z sha 6400f26 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 2700b9e into main Sep 13, 2026
90 checks passed
@steipete
steipete deleted the codex/tighten-file-preview-spacing branch September 13, 2026 15:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant