Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ See [`changelog/README.md`](changelog/README.md) for the full index.

## Latest releases

- **[0.11.7](changelog/0.11.7.md)** — 2026-04-28 · Default tab is now Sources (was Measures); fix Measures + Columns flipping to ascending sort on report reload
- **[0.11.6](changelog/0.11.6.md)** — 2026-04-26 · Cross-doc link integrity — fix `[Sources.md](#)` regression in Model.md §3.3 + Index.md glossary entries now link to their companion docs (Measures, DataDictionary, Functions, CalcGroups)
- **[0.11.5](changelog/0.11.5.md)** — 2026-04-26 · Improvements audit names the entities — tables / measures / columns missing descriptions now list the actual offenders inline
- **[0.11.3](changelog/0.11.3.md)** — 2026-04-26 · Mobile responsive — landing + tabs + primary tabs cleaned up for phone viewports; sample loads cleanly from a LinkedIn-arriving mobile click
Expand Down
14 changes: 14 additions & 0 deletions changelog/0.11.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## [0.11.7] — 2026-04-28 · Default tab → Sources, fix sort-reset on reload

Two small UX defaults that were quietly wrong.

### Changed
- **Default tab on first load is now Sources** (was Measures). Sources is the highest-leverage entry point for someone documenting an unfamiliar PBIP — it answers "where does this data come from?" before "what calculations does it do?". Measures is one click away.
- **`switchTab("sources")` on report reload** — was previously `switchTab("measures")`, so swapping reports always dropped you on Measures regardless of the initial-load default.

### Fixed
- **Reload no longer flips Measures + Columns to ascending sort.** The cross-report state-reset at `__loadBrowserData` was setting `desc: false` while preserving the sort key — so the initial-load default (`usageCount` descending: busiest measures first) flipped to ascending on every report swap. Now explicitly re-applies `{ key: "usageCount", desc: true }` for both measures and columns on reload, matching the initial render.

### Notes
- Sort default for Measures and Columns has always been "Used (desc)" on first load — this release just makes reload behave the same way.
- No new tests; the bug was in initial-state setup, not in any pure function.
1 change: 1 addition & 0 deletions changelog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version

| Version | Date | Theme |
|---|---|---|
| [0.11.7](0.11.7.md) | 2026-04-28 | Default tab → Sources; fix Measures + Columns flipping to ascending sort on report reload |
| [0.11.6](0.11.6.md) | 2026-04-26 | Cross-doc link integrity — fix `[Sources.md](#)` regression in Model.md §3.3 + wire Index.md entries through `xref()` so glossary terms link to their companion docs |
| [0.11.5](0.11.5.md) | 2026-04-26 | Improvements: tables / measures / columns lacking descriptions now list the actual offenders inline (was: count + percentage only) |
| [0.11.3](0.11.3.md) | 2026-04-26 | Mobile responsive — landing card + tabs row + primary tabs + modals clean up at ≤720 / ≤480 |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powerbi-lineage",
"version": "0.11.6",
"version": "0.11.7",
"description": "Generate documentation from Power BI PBIP projects — runs in your browser (nothing uploaded) or as a local CLI. Outputs a searchable dashboard plus 9+ Markdown docs ready for ADO Wiki or GitHub.",
"license": "MIT",
"author": "Jonathan Papworth",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ Every anchor link is verified by `tests/md-anchors.test.ts` — drift fires CI.

[`changelog/`](changelog/) — one file per release. Full index in [`changelog/README.md`](changelog/README.md). Future direction is open-ended; feature requests welcome via Issues.

Latest release: **[v0.11.6](changelog/0.11.6.md)** — Cross-doc link integrity. Fixes a stale `[Sources.md](#)` link in Model.md §3.3 and wires every Index.md glossary entry through `xref()` so terms link straight to their companion docs (Measures, Data Dictionary, Functions, Calc Groups). Eight new "no empty-fragment link" tests close the regression class.
Latest release: **[v0.11.7](changelog/0.11.7.md)** — Default tab on first load is now **Sources** (was Measures), and Measures + Columns sort no longer flips to ascending on report reload. Small UX defaults that were quietly wrong.
13 changes: 9 additions & 4 deletions src/client/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function addCopyButtons(){
});
})();

let activeTab="measures",lastTab="measures";
let activeTab="sources",lastTab="sources";
// Typed as Record<string, …> so dynamic key access (e.g.
// sortState[t] where t is a string) type-checks. Runtime keys
// are still only "measures" / "columns" but a string-key index
Expand Down Expand Up @@ -2109,7 +2109,7 @@ function downloadMarkdown(){
setTimeout(function(){URL.revokeObjectURL(url);},1000);
}

renderSummary();renderTabs();renderMeasures();renderColumns();renderTables();renderRelationships();renderSources();renderSourceMap();renderSourcesViewToggle();renderFunctions();renderCalcGroups();renderPages();renderUnused();renderDocs();refreshMdTabVisibility();switchTab("measures");addCopyButtons();
renderSummary();renderTabs();renderMeasures();renderColumns();renderTables();renderRelationships();renderSources();renderSourceMap();renderSourcesViewToggle();renderFunctions();renderCalcGroups();renderPages();renderUnused();renderDocs();refreshMdTabVisibility();switchTab("sources");addCopyButtons();

// ─────────────────────────────────────────────────────────────────────
// Print support — Ctrl-P produces a PDF covering every tab.
Expand Down Expand Up @@ -2199,7 +2199,12 @@ function __loadBrowserData(opts: {
// "Ghost", giving the impression the dashboard was broken.
for (const k of Object.keys(searchTerms)) searchTerms[k] = "";
for (const k of Object.keys(showUnusedOnly)) showUnusedOnly[k] = false;
for (const k of Object.keys(sortState)) sortState[k] = { key: sortState[k].key, desc: false };
// Reload should land on the same sort the initial render uses —
// usage-count descending so the busiest measures / columns are at
// the top. Flipping desc:false here used to send the user to a
// bottom-up view on every report swap.
sortState.measures = { key: "usageCount", desc: true };
sortState.columns = { key: "usageCount", desc: true };
openPages.clear();
openTables.clear();
showAutoDate = false;
Expand Down Expand Up @@ -2300,6 +2305,6 @@ function __loadBrowserData(opts: {
const detBtn = document.getElementById("md-lite-detailed");
if (litBtn) litBtn.classList.toggle("active", currentMode === "lite");
if (detBtn) detBtn.classList.toggle("active", currentMode === "detailed");
switchTab("measures");
switchTab("sources");
addCopyButtons();
};
Loading