Skip to content

Wrap the Activity list's timestamp under its event at narrow widths - #52451

Merged
AmethystLiang merged 6 commits into
mainfrom
AmethystLiang/activity-timestamp-narrow
Nov 29, 2026
Merged

AmethystLiang merged 6 commits into
mainfrom
AmethystLiang/activity-timestamp-narrow

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

In a bot item's Activity, each event line has its time on the right. In the narrowest item pane the time stayed beside every line and squeezed the text into a thin column, so a line with a note grew very tall. Now, in a narrow pane, the time moves under its line and the text gets the full width.

Files Added Deleted Net
Test 0 0 0 0
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​164 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​158

What Changed

  • The Activity list (BotItemActivityList) is now its own named width container (@container/item-activity), and an event's time wraps under its line when the list is under 320px wide (a pane of about 340px).
  • The wrap classes sit on a wrapper around the time, so the date keeps its own hover area and its tooltip stays over the date.
  • Two component fixtures show the real item pane at 340px and 560px (BotItemPaneEventLines), and the Activity list fixtures gain a 560px width and lines with notes.

Why

The time's narrow-width rule (@max-[340px]) named no container, so it measured the whole item pane instead of the list. That rule matches widths under 340px, so a 340px pane never matched, and the time stayed beside each event, leaving the text about 160px. Measuring the list itself makes the wrap follow the room the lines really have, wherever the list is placed.

Linked Issue

N/A (internal change).

Visual Proof

Headless component fixture renders with made-up data. Before is these fixtures with main's BotItemActivityList.tsx, so the data is identical.

Item pane at 340px:

Dark Light
Before 340 before dark 340 before light
After 340 after dark 340 after light

Item pane at 560px, after (pixel-identical to main; the time stays beside each line):

Dark Light
560 after dark 560 after light

Hovering a wrapped time at 340px: the tooltip's arrow points at the date. The tooltip box is pinned to the fixture's left viewport edge, which is a limit of the fixture frame, not the app.

340 tooltip hover dark

Testing

  • Hosted unit runs on this branch (a test-first run failed on the old rule, then passed with the fix; the class test was later dropped under the repo's test rules, and the fixtures are the evidence).
  • Lint, format and typecheck.
  • Code review and a screenshot check of the fixtures at 340, 560 and 700px in dark and light.
  • Automated tests added/updated, or explained why not below: no committed test, since the repo's rules keep UI class assertions out of unit tests.
  • Every added test fails without this change and avoids the test anti-patterns (no tests added).

Platforms: the change is renderer CSS only, checked in headless Chromium fixture renders on macOS; it does not depend on the platform, SSH or remote hosts.

Rows at 560px and 700px are pixel-identical to main. Mobile has no such width rule: its Activity keeps the time beside each line at the phone's full width, so it is unchanged.

Performance

None, because this is CSS only: one more container query box on the Activity list, evaluated by the browser on layout like the pane's existing one. No new rendering, state or JavaScript.

Risk

Level: Low. The list now has inline-size containment, so anything inside it that is fixed-positioned would be placed relative to the list; nothing inside it is (tooltips and menus render outside it). Wider panes render as before. Back out with a plain revert.

AI Disclosure

N/A (internal contributor).

Review

N/A.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

The time's narrow-width query measured whatever container hosted the list
(the whole pane, or nothing in fixtures), and Tailwind's @max-[340px] is
width < 340px, so a 340px pane kept the time beside every line. The list is
now its own named container and wraps the time below 320px of list width.
Its class assertions test UI wiring, which the repository's test rules
keep out of unit tests; the fixtures show the wrap instead.
Shows the item pane's Activity time under each line at a 340px pane and
beside it at 560px, notes included.
Keeps the item pane fixture file within its line limit.
…wraps

The full-row basis and indent moved to a wrapper, so the time's hover area
and tooltip stay on the date instead of the whole row.
@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

BotItemActivityList now measures its own width and moves event timestamps below their text when the list is narrower than 320px.

  • Narrow Activity rows put each timestamp below its event text.

Reviews (1) · Last reviewed commit: "fix(bot-items): keep the activity time's..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The activity list now uses a named container to apply timestamp layout rules at narrow widths. New fixtures cover medium and wide activity widths, note-bearing activity events, and bot-item panes at two widths. The pane fixtures include an interaction that scrolls the activity region to the bottom.

Merge Risk: Minimal · up to 6dfb9

The Activity list now moves timestamps below their events when the list is narrower than 320px. Wider layouts are reported as unchanged. This is a low-risk, CSS-only change with fixtures covering the new widths, and no merge-blocking concern was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Activity list's timestamp wraps under its event at narrow widths. The raw summary and objectives confirm this is the primary change, with a named width container a…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The PR description follows the repository template closely. It includes the ELI5, What Changed, Why, Linked Issue (marked N/A as internal), Visual Proof with before and after fixture renders for the 3…
Full details: Title check

Explanation

The title names the main change: the Activity list's timestamp wraps under its event at narrow widths. The raw summary and objectives confirm this is the primary change, with a named width container and a wrapper around the timestamp. The title is specific and related to the changeset.

Full details: Description check

Explanation

The PR description follows the repository template closely. It includes the ELI5, What Changed, Why, Linked Issue (marked N/A as internal), Visual Proof with before and after fixture renders for the 340px pane and after renders for 560px, Testing with checklist items and platform notes, Performance with a one-line justification, Risk with a Low level and a revert path, AI Disclosure marked N/A for an internal contributor, Review, the agent skill boundary, and the checklist. The Testing section explains why no committed test exists. The Visual Proof section explains the 560px and 700px checks. The Linked Issue section is marked N/A (internal change), which the template allows only for maintainers, and the author is not shown to be a stablyai member, so this is a minor gap. The Performance section is short but meets the one-line requirement.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 415a6e77-941f-45cc-b4e9-155a3479f1e4
Commits

Reviewing files that changed from the base of the PR and between e7241c1 and 6dfb92c.

Files selected for processing: 3

  • src/renderer/src/components/bots/items/BotItemActivityList.fixture.tsx
  • src/renderer/src/components/bots/items/BotItemActivityList.tsx
  • src/renderer/src/components/bots/items/BotItemPaneEventLines.fixture.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@AmethystLiang
AmethystLiang merged commit 95279ce into main Nov 29, 2026
199 of 202 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant