Skip to content

feat(tape): add floating back-to-top button when scrolling tape - #95

Merged
mlgitdev merged 1 commit into
mainfrom
feat/tape-back-to-top-94
Dec 4, 2026
Merged

mlgitdev merged 1 commit into
mainfrom
feat/tape-back-to-top-94

Conversation

@mlgitdev

@mlgitdev mlgitdev commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Summary

Resolves #94

Adds an automatic floating ↑ Back to Top (#tape-scroll-top) pill to the Running Momentum Tape (in both the embedded pane and detached web/tape.html window) that appears as soon as the trader scrolls down past 24px, sits cleanly side-by-side with New Events ↑ inside a bottom-centered .tape-float-bar with zero overlap, and jumps immediately back to scrollTop = 0 while preserving manual pause state.

Motivation / Context

The Running Tape stores up to 5,000 alerts (3,000 DOM rows across 4-day persistence), making manual scrolling back to the top tedious during historical or off-hours review when no new events are arriving to trigger New Events ↑.

Changes

Resolves #94

  • Frontend (web/js/tape.js, web/css/app.css, web/index.html, web/tape.html):
    • Added #tape-scroll-top (↑ Back to Top) inside a bottom-centered flex bar .tape-float-bar (bottom: 18px; gap: 8px) alongside #tape-new-events so both pills can display simultaneously with zero overlap against each other, .pane-head, sticky <thead>, scrollbars, or #corner-version-badge.
    • Fixed @keyframes bob to vertical-only translateY(3px) once horizontal centering moved to .tape-float-bar.
    • Added SCROLL_TOP_THRESHOLD = 24, Tape.updateScrollTopBtn(), and race-free instant Tape.scrollToTop() that preserves Tape.paused and clears unpaused scrolledNew state.
    • Synchronized ?v=12 asset cache-buster versions across both web/index.html and web/tape.html.
  • Versioning & Docs (VERSION, docs/SPEC.md, docs/RELEASES.md, docs/releases/v2.16.0.md, docs/wiki/):
    • Bumped root VERSION from 2.15.0 → 2.16.0 (MINOR user-facing feature) and synced docs/wiki/_Footer.md.
    • Updated docs/SPEC.md (spec-sync), docs/RELEASES.md, docs/releases/v2.16.0.md, and docs/wiki/Running-Momentum-Tape.md.
  • Tests (tests/test_tape_scroll_top.py):
    • Added test-first regression suite verifying #tape-scroll-top, bottom-anchored .tape-float-bar, vertical-only @keyframes bob, index.html/tape.html ?v= parity, and docs/SPEC.md documentation.

Verification & Testing

  • .venv\Scripts\python.exe -m compileall -q app run_app.py: passed.
  • .venv\Scripts\python.exe -m unittest discover -s tests -p "test_*.py": 115/115 tests passed (1.050s).
  • Live Browser ui-qa-pass (isolated temp NEWSALERTS_DIR server with seeded rows + live EventBus drip):
    • Caught initial top: 44px overlap against .pane-head/<thead> on first pass, relocated .tape-float-bar to bottom: 18px, and re-verified PASS across all viewports:
      • 1600x900 (single pill & simultaneous New Events ↑ (1) + ↑ Back to Top side-by-side with +8.00px gap, pause preservation on click, unpause on New Events ↑ click)
      • 1920x1080, 820x900, 640x520 (zero overlap with .pane-head, sticky <thead>, and #corner-version-badge)
      • Detached web/tape.html at 1280x720
    • Console errors: 0 across every screen and viewport.
  • Portable Build & Verification Gate: .\build.ps1 -Task build and .\build.ps1 -Task verify-packages passed (NewsAlerts.exe 15.1 MB, valid PE header, zero secrets).

Checklist

  • Issue feat(tape): add floating back-to-top button when scrolling tape #94 created and linked (Resolves #94)
  • Developed test-first in isolated git worktree (.worktrees/feat-tape-back-to-top-94)
  • VERSION bumped (2.16.0), docs/SPEC.md synced (spec-sync), release notes & wiki updated
  • web/index.html and web/tape.html sibling parity verified
  • Live integrated-browser ui-qa-pass passed with 0 console errors and 0 overlaps
  • Portable .exe built and verified (verify-packages)
  • Full unit test suite passes locally and Multi-OS PR CI verified

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

✅ PR Validation Passed

  • Conventional Commit title syntax
  • Required template sections present
  • Security audit ready

Ready for review by @mlgitdev!

@mlgitdev
mlgitdev merged commit 7935b19 into main Dec 4, 2026
6 checks passed
@mlgitdev
mlgitdev deleted the feat/tape-back-to-top-94 branch December 4, 2026 12:31
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.

feat(tape): add floating back-to-top button when scrolling tape

1 participant