Skip to content

✨ tracker: hive notes show for 30s then tuck into an info icon - #15588

Merged
clubanderson merged 2 commits into
v5from
feat/tracker-caption-collapse
Oct 30, 2026
Merged

clubanderson merged 2 commits into
v5from
feat/tracker-caption-collapse

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15587

Owner (Activity Monitor tracker rows, screenshot 20:17 EDT): "we should show the hive comments when they are new for 30s. then they should shrink to the left inside a hive-info icon. nice subtle animation. someone can click on the icon to expand the info for another 30s. then it shrinks back again."

What changes

  • STAGE_TRACKER_CAPTION_SHOW_MS = 30000. A row's "Hive: …" event line opens for 30 s from the moment it is written (new caption / stage word from the payload diff, or an owner action), then tucks: the text slides a few px left and fades while a clip-path wipe closes it from the right (≈400 ms ease-in-out) into a small ⬡-i button (.cue-event-ico, aria-label="Hive note", aria-expanded) sitting where "Hive:" sat. The line keeps one fixed height either way, so the chevrons never shift.
  • Tooltip keeps everything. The button's title is the whole line plus its age (Hive: … · 26s ago), refreshed by the existing 15 s cue tick. Hover shows only that; it never opens the line.
  • Click / Enter / Space re-opens for another 30 s, then it tucks again; a click while open tucks it at once.
  • One shared timer, per-row windows (stageTrackerNoteSchedule arms a single setTimeout for the earliest due tuck; every render / tick runs stageTrackerNoteSync in place). The tucked flag, aria-expanded and the ageing title are stripped from stageTrackerRowSrcKey, so a tuck never swaps a row's node mid-slide; a freshly rendered node arrives already tucked.
  • Hidden tab pauses. visibilitychange → stageTrackerNoteVisibility: while hidden the open windows are frozen at the moment the tab went hidden and the timer is cleared; on return the hidden time is given back and the timer re-armed. A note is never spent unseen.
  • Lifetime. With auto-collapse on, lines no longer expire after 2 minutes or fade — a tucked note stays with its row until a newer line replaces it or the row leaves the payload. Lines only arise from payload diffs, so a freshly loaded page starts with no open notes (the "older than 30 s start collapsed" case is satisfied trivially; a note rendered past its window arrives tucked).
  • ⚙ → Hive notes → "Auto-collapse hive notes" (default on, hive.tracker.notetuck, same localStorage pattern as Celebrate merges). Off: no button, the line stays open and keeps the old 2-minute fade — existing behaviour and tests unchanged.
  • Reduced motion (prefers-reduced-motion: reduce, and the .ham-rm-preview body class): instant toggle.

Screenshots

Dark — expanded (new line, first 30 s):

dark expanded

Dark — mid-animation (≈180 ms into the tuck; the text wipes/slides left into the icon):

dark mid-animation

Dark — collapsed (hover the ⬡-i for the full note + age; click to re-open):

dark collapsed

Light — expanded / collapsed:

light expanded

light collapsed

Tests

  • TestStageTrackerNoteTuckNode (fake clock + DOM): new line open → tucked at exactly 30 s → click re-opens → tucks again after 30 s → click while open tucks at once; hidden tab freezes a 20 s-old window across 60 s hidden and the remaining 10 s run on return; two rows, independent windows, one shared timer; stageTrackerNoteShift only moves open windows; ttl Infinity keeps lines until the row leaves while the default ttl still expires; stageTrackerRowSrcKey is stable across tuck / re-open / age; preference off keeps every line open, restores the fade, un-tucks in place and arms no timer.
  • TestStageTrackerNoteTuckWiring: the 30 s constant, pref key, markup, ⚙ toggle, visibility hook, CSS (fixed height, transition, reduced-motion rule) are in the page.
  • Existing TestStageTrackerCuesNode / TestStageTrackerCuesWiring / TestStyleRatchet pass unchanged (tokens + color-mix only; no #NNNN in CSS comments).

Docs

src/docs/dashboard-sections.md (Event line → Show, then tuck), src/docs/dashboard-copy-inventory.md (new section), changelog.d/added-tracker-hive-note-tuck.md.

The row's "Hive: …" event line opens for STAGE_TRACKER_CAPTION_SHOW_MS
(30 s) when written, then slides left into a ⬡-i button whose tooltip
keeps the note and its age. Click / Enter / Space re-opens it for
another 30 s; a click while open tucks it at once. One shared timer,
per-row windows, frozen while the tab is hidden. Reduced motion toggles
instantly. ⚙ → Hive notes → Auto-collapse hive notes (default on,
hive.tracker.notetuck) restores the old two-minute fade when off.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15526 🌱 dashboard: split stage_tracker.go into 4 files same files src/docs/dashboard-sections.md
#15574 🌱 dashboard: split stage_tracker.go into 4 files same files src/docs/dashboard-sections.md
#15530 🐛 fix(dashboard): issue-row linked PR passes null when the lineage chip is empty same files src/pkg/dashboard/static/index.html
#15584 🐛 Close the hive's own empty-diff PRs as superseded instead of asking a person same files src/pkg/dashboard/static/index.html

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: hive notes should show for 30s then tuck into a hive-info icon

1 participant