Skip to content

v0.11.7 — Default tab → Sources, fix sort-reset on reload#103

Merged
jonathan-pap merged 1 commit into
mainfrom
feat/default-tab-sources
Apr 28, 2026
Merged

v0.11.7 — Default tab → Sources, fix sort-reset on reload#103
jonathan-pap merged 1 commit into
mainfrom
feat/default-tab-sources

Conversation

@jonathan-pap
Copy link
Copy Markdown
Owner

Summary

Two small UX defaults that were quietly wrong on the dashboard.

Changed

  • Default tab on first load is now Sources (was Measures). Sources answers "where does this data come from?" — the question someone reaches for first when meeting an unfamiliar PBIP.
  • Three call sites updated to keep them in sync:

Fixed

  • Sort default flipped to ascending on every report reload. The state-reset at `__loadBrowserData` was setting `desc: false` while preserving the key — so the initial-load default (`usageCount` descending: busiest measures + columns first) silently inverted on every report swap.
  • `src/client/main.ts:2202` — explicit re-application of `{ key: "usageCount", desc: true }` for both Measures and Columns on reload, matching initial render.

Test plan

  • `npm test` — 276/276 pass (no test changes; the bug was in initial-state setup, not in any pure function)
  • `npm run build:browser` — `docs/index.html` rebuilt
  • After merge, hard-refresh live demo: lands on Sources; click Measures → confirm "Used ↓" sort indicator and busiest measures at top; reload sample → still on Sources; switch to Measures → still descending

🤖 Generated with Claude Code

… on reload

Two small UX defaults that were quietly wrong:

1. Default tab on first load was Measures; switching to Sources. The
   highest-leverage entry point for someone documenting an unfamiliar
   PBIP is "where does this data come from?" — Measures is one click
   away. Three call sites updated (initial declaration + initial
   switchTab + reload switchTab).

2. Reload no longer flips Measures/Columns to ascending sort. The
   cross-report state-reset at __loadBrowserData was setting
   desc:false while preserving the key, so the initial-load default
   (usageCount desc) flipped on every report swap. Now explicitly
   re-applies the same {key:"usageCount",desc:true} both at module
   init and on reload.

Tests: 276/276 unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jonathan-pap jonathan-pap enabled auto-merge (squash) April 28, 2026 06:14
@jonathan-pap jonathan-pap merged commit c89cf04 into main Apr 28, 2026
3 checks passed
@jonathan-pap jonathan-pap deleted the feat/default-tab-sources branch April 28, 2026 06:14
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