Skip to content

fix(ui,db): dead scroll space below footer + 9s workspace delete - #66

Merged
sanketpatel32 merged 1 commit into
mainfrom
fix/scroll-void-delete-cascade
Nov 22, 2026
Merged

sanketpatel32 merged 1 commit into
mainfrom
fix/scroll-void-delete-cascade

Conversation

@sanketpatel32

Copy link
Copy Markdown
Owner

Summary

  • Scroll void: visually-hidden .sr-only/clip-rect elements inside scroll containers used position:absolute → escaped the clip and stretched document height by ~1,400px of dead space (2,844px measured vs 1,469px of content). Switched to position:fixed on .sr-only, .rtable thead, and icon-rail labels.
  • Slow delete: workspace delete ran 88k-row full scans per deleted analyzer_run/scan — migration 010 adds idx_findings_analyzer_run + idx_metrics_scan (8.5s → 0.6s measured).
  • Flaky test: FindingNotes tie-broke on random UUID → now rowid (insertion order, covered by existing index).
  • WAL: DSN sets journal_mode(WAL) — Vacuum already assumed WAL; external readers stop blocking behind writers.

Test plan

  • go test ./internal/database/ -count=2 — pass
  • Live probe: scrollHeight 2,844 → 1,469; page ends at footer
  • Cascade delete re-timed on DB copy with indexes: 8.5s → 0.6s
  • Migration 010 verified applied on live DB; journal_mode=wal

Generated with Devin

Two dogfooding hits on the Home page:

1. ~1,400px of scrollable void below the footer. Visually-hidden
   (.sr-only / clip:rect) elements inside scroll containers used
   position:absolute; with no positioned ancestor their containing block
   is the document, so they escaped the container's overflow clip and
   extended the page's scrollable height (2,844px for 1,469px of real
   content). Switched to position:fixed — anchored to the viewport they
   can never add scroll overflow. Same swap on .rtable thead and the
   icon-rail label block, which share the pattern inside scrollers.

2. "Remove this workspace" spun on Working for 6-9s+. The cascading
   DELETE had no index on findings.analyzer_run_id (full 88k-row scan
   per deleted analyzer_run) or metrics.scan_id. Migration 010 adds
   both; measured 8.5s -> 0.6s on a 14k-finding workspace.

Also: FindingNotes tie-broke equal created_at on random UUID (~50%
flake) — now rowid (insertion order, covered by the scope index). And
the DSN gains journal_mode(WAL): Vacuum already checkpointed a WAL log
that delete-mode never produced, and external readers no longer block
behind writers.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@sanketpatel32
sanketpatel32 merged commit 945b6d2 into main Nov 22, 2026
3 checks passed
@sanketpatel32
sanketpatel32 deleted the fix/scroll-void-delete-cascade branch November 22, 2026 11:29
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