You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(filters): consistent provider+account dropdown filtering across all main tabs #186
column-filter re-renders client-side, no API re-fetch
Purchase Plans
✓
✓
✓ both wired
Purchase History
✓
✓
⚠ provider re-populates account list, but neither dropdown's change event triggers loadHistory() — user must hit the date-range Apply button to actually re-query
RI Exchange
✗
✗
n/a
This means the same operator action ("scope my view to AWS account 1234") behaves differently on every tab, and on Recommendations + RI Exchange isn't even possible without per-column popovers or backend filters.
Acceptance criteria
For every main tab — Dashboard, Recommendations, Purchase Plans, Purchase History, RI Exchange:
A consistent Provider + Account dropdown pair is rendered at the top of the tab (or in a tab-local toolbar).
The Account dropdown is populated from the same populateAccountFilter helper used today, scoped to the current provider value.
Changing the Provider dropdown:
Repopulates the Account dropdown (filtered to that provider's accounts).
Resets the Account selection to "(All accounts)".
Calls the tab's load*() to re-fetch data.
Changing the Account dropdown:
Sets state.currentAccountIDs to [id] or [] for "All accounts".
Calls the tab's load*() to re-fetch data.
Both dropdowns survive populateAccountFilter repopulation without losing their change listeners.
Each tab's load path passes currentProvider + currentAccountIDs to its API call (most already do).
Tests pin the change-→-load round-trip per tab.
Existing pattern to follow
frontend/src/plans.ts:1080-1100 already gets this right (provider + account filters, both wired to loadPlans). Use it as the template; lift the wiring helper into frontend/src/utils.ts if the duplication starts to bite.
Backend considerations
Recommendations: api.getRecommendations(provider, accountIDs) already accepts account IDs (used today by the per-column popover). Top-level dropdown is purely a UI add.
RI Exchange: api.getRIExchange* calls today don't take an account filter. Likely a small backend change to add ?account_id=… query parameter on the relevant endpoints. Verify before estimating effort.
History: dropdowns exist; just need the change → loadHistory() wiring (one-line per dropdown).
Suggested split
This is naturally a 5-PR feature, one per tab. Suggest landing in this order so the highest-impact tab ships first:
Recommendations — primary user surface, currently has no top-level account filter.
RI Exchange — currently has no filter at all.
History — wire the existing dropdowns to refresh on change (smallest diff).
Background
The provider/account dropdown pair is the primary lens our users have onto the data. Today the coverage is uneven across the five main tabs:
changeevent triggersloadHistory()— user must hit the date-range Apply button to actually re-queryThis means the same operator action ("scope my view to AWS account 1234") behaves differently on every tab, and on Recommendations + RI Exchange isn't even possible without per-column popovers or backend filters.
Acceptance criteria
For every main tab — Dashboard, Recommendations, Purchase Plans, Purchase History, RI Exchange:
populateAccountFilterhelper used today, scoped to the current provider value.load*()to re-fetch data.state.currentAccountIDsto[id]or[]for "All accounts".load*()to re-fetch data.populateAccountFilterrepopulation without losing theirchangelisteners.currentProvider+currentAccountIDsto its API call (most already do).Existing pattern to follow
frontend/src/plans.ts:1080-1100already gets this right (provider + account filters, both wired toloadPlans). Use it as the template; lift the wiring helper intofrontend/src/utils.tsif the duplication starts to bite.Backend considerations
api.getRecommendations(provider, accountIDs)already accepts account IDs (used today by the per-column popover). Top-level dropdown is purely a UI add.api.getRIExchange*calls today don't take an account filter. Likely a small backend change to add?account_id=…query parameter on the relevant endpoints. Verify before estimating effort.change→loadHistory()wiring (one-line per dropdown).Suggested split
This is naturally a 5-PR feature, one per tab. Suggest landing in this order so the highest-impact tab ships first:
References
frontend/src/dashboard.ts:26-50frontend/src/plans.ts:1080-1100frontend/src/history.ts:69-77frontend/src/recommendations.ts(per-column popover machinery,applyColumnFilters)frontend/src/riexchange.ts:50-58frontend/src/utils.ts:populateAccountFilter