Skip to content

feat(service-logcat): load-older paging affordance + stable row keys (0.6.1)#326

Closed
I-am-nothing wants to merge 4 commits into
mainfrom
feat/logcat-load-older
Closed

feat(service-logcat): load-older paging affordance + stable row keys (0.6.1)#326
I-am-nothing wants to merge 4 commits into
mainfrom
feat/logcat-load-older

Conversation

@I-am-nothing

Copy link
Copy Markdown
Contributor

What

ServiceLogcat grows an optional paging surface for the dispatch log-cursor API:

  • onLoadOlder?: () => void, hasOlder?, loadingOlder? — renders a load-older row at the OLD end (bottom; newest sits at top) with an explicit button + auto-fire when scrolled near it (one-shot latch, re-armed when the caller reacts)
  • LogEntry.seq?: number — row keys prefer seq; the fallback key gains the filtered index (ts+msg alone collided on repeated lines)
  • Scroll-anchor fix: the pre-existing prepend compensation offset scrollTop on ANY list growth, which would have yanked the view on bottom-appends — it now keys off the top row's identity (grewAbove)
  • Fully backwards compatible: without the new props there is no affordance and no auto-fire

Version 0.6.0 → 0.6.1 in this PR (pre-1.0 patch convention), release label set.

Verification

  • pnpm typecheck / pnpm build clean (verified independently)
  • ServiceLogcat tests 6/6: button fires, gating off, loading suppresses re-fire, auto-fire once near bottom, bottom-append keeps scrollTop while prepend still offsets, seq-keyed duplicate rows
  • Full suite 793 green in implementation run; LoadOlder story added (3 pages × 20 entries, simulated fetch)

🤖 Generated with Claude Code

https://claude.ai/code/session_01NWoUBtpYmAJ6MW81W3ayTL

… keys

- LogEntry gains optional seq; row keys prefer seq, fall back to a
  collision-free ts/msg/filtered-index composite
- New optional props onLoadOlder/hasOlder/loadingOlder render a
  load-older row at the old end (bottom) that also auto-fires when
  scrolled near it, latched once per page while loading
- Prepend scroll compensation now keys off the top row so bottom
  (older) appends no longer shift scrollTop
- Story LoadOlder demos seq-keyed paging; component tests cover the
  button, gating, loading suppression, scroll anchoring, and keys
- Bump version 0.6.0 -> 0.6.1

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NWoUBtpYmAJ6MW81W3ayTL
@I-am-nothing I-am-nothing added the release Trigger a version bump on merge label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Storybook Preview: https://mirrorstack-ai.github.io/web-ui-kit/pr/326/

github-actions Bot added a commit that referenced this pull request Jul 1, 2026
…le fallback keys

The load-older row reuses Button (text/xs/fullWidth/loading) like
ActivityList's load-more instead of a hand-rolled button+spinner, and the
seq-less fallback key swaps the filtered index (which re-keyed every row per
prepend) for a duplicate-occurrence suffix counted from the old end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NWoUBtpYmAJ6MW81W3ayTL
github-actions Bot added a commit that referenced this pull request Jul 2, 2026
@I-am-nothing I-am-nothing force-pushed the feat/logcat-load-older branch from 6fdd41b to 1177666 Compare July 3, 2026 22:08
github-actions Bot added a commit that referenced this pull request Jul 3, 2026
I-am-nothing and others added 2 commits July 4, 2026 07:31
…, option badge (#328)

* feat(service-logcat,segmented-button): initialQuery seed, i18n labels, option badge

ServiceLogcat gains initialQuery (seed the text filter on mount, e.g. a deep
link) and an optional labels prop covering every string it renders, so
callers outside English can localize it. SegmentedButton options gain an
optional badge (small count pill anchored to the option's corner).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* docs(service-logcat,segmented-button): add stories for initialQuery, labels, badge

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
main already published 0.6.2 via #329 (an independent branch that merged
directly to main before this one did), so this branch's own 0.6.2 would
collide — no version diff for the release automation to act on when this
merges. Bumping to 0.6.3 so merging this branch actually publishes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@I-am-nothing

Copy link
Copy Markdown
Contributor Author

Superseded by #330 — recreated cleanly against current main (this branch had drifted into a merge conflict, and its stacked-merge history with #328 made it messy to untangle in place).

@github-project-automation github-project-automation Bot moved this from Backlog to Done in MirrorStack Platform Jul 4, 2026
I-am-nothing added a commit that referenced this pull request Jul 4, 2026
…ry/i18n labels/badge (#330)

Recreates the payload of #326/#328 as one clean PR based on current main
(those were tangled by a stacked-PR merge that landed #328 into #326's
branch instead of main, and #326 had since drifted into merge conflict).

- ServiceLogcat: load-older paging affordance (auto-fires near the old end,
  stable seq/occurrence-keyed rows), initialQuery (seed the text filter on
  mount), and a full labels prop covering every string it renders.
- SegmentedButton: per-option badge (small count pill anchored to the
  option's corner).

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@I-am-nothing I-am-nothing deleted the feat/logcat-load-older branch July 4, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Trigger a version bump on merge

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant