fix(inventory): default sub-tab is Active Commitments, not RI Exchange - #757
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe default Inventory & Coverage sub-section was switched from RI Exchange to Active Commitments. The constant definition, HTML markup (including active state and visibility), and test expectations were updated consistently to reflect the new landing tab behavior. ChangesDefault Inventory Sub-Section
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Users opening Inventory & Coverage expect the at-a-glance commitment view, not the more specialised RI Exchange workflow. Closes #751.
efcd122 to
13b99dd
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…min (closes #902) (#905) Resolve QA A.4: Inventory & Coverage remembered its last sub-tab via hidden in-memory session state while Admin always read its sub-tab from the /admin/<subtab> URL. The inconsistency was the defect. Make Inventory sub-tabs URL-addressable as /inventory/<subtab>, matching the existing Admin convention: - loadInventory() now derives the sub-section from the URL path (getInventorySubTabFromPath), not the module-level currentSubSection, so a fresh /inventory lands on the default (active-commitments) and a /inventory/<subtab> deep link lands on that sub-tab. - A sub-nav click routes through navigation.switchInventorySubTab, which pushes /inventory/<subtab> via history.pushState so the view is shareable/bookmarkable and browser back/forward works. - The history push lives in navigation.ts alongside switchSettingsSubTab so the single historyId counter stays authoritative for the back/forward dirty-guard; inventory.ts keeps the pure DOM view switch. Supersedes the partial PR #757 session-memory behavior with explicit URL state. Both pages now behave identically; existing /admin/* deep links are unaffected. Tests assert, for each page: no param -> default sub-tab, explicit param -> that sub-tab, switching updates the URL (query/hash preserved, no duplicate entry), and unknown param -> default.
Summary
Clicking "Inventory & Coverage" in the sidebar opened the RI Exchange sub-tab by default. Users expect the at-a-glance Active Commitments view; RI Exchange is a more specialised workflow.
Fix
DEFAULT_SUB_SECTIONchanged from'ri-exchange'to'active-commitments'.index.html:activeclass andaria-selected="true"moved from RI Exchange to Active Commitments;hiddenflipped accordingly.?subSection=ri-exchange) still work; only the no-param default changes.Files changed
frontend/src/inventory.tsfrontend/src/index.htmlfrontend/src/__tests__/inventory.test.tsTest plan
buildInventoryDOMhelper, fallback test (unknown sub-section -> active-commitments), andloadInventoryfirst-load assertion.Closes #751.
Summary by CodeRabbit