basquetWi + New ticket
mars MARS-635

Standardize /alumnos filters onto the shared URL-param filter pattern

Backlog normal cmcoder-mars-cc

Elazar 2026-08-13: /alumnos has 'strange pulldown filters' vs the rest of the app. Measured difference is NOT the primitive - both use shadcn ui/Select (33 files) - it is the PATTERN. /practicas (src/components/practicas-filters.tsx) is the standard: filters in their own bar, each one URL-param driven via router.push (setParam deletes the param when empty and always resets ?page), so a filtered view is shareable, bookmarkable and survives reload/back. /alumnos (src/components/alumnos-table.tsx:233-250) instead injects a lone comision Select as DataTable's filterChrome, held in React state (setComisionFilter) with no URL param, plus two local quirks: a '__all__' sentinel mapped back to '' and a render-prop <SelectValue>{(value) => ...}</SelectValue> that no other call site uses. It filters client-side over already-loaded rows, so the selection is lost on reload and cannot be linked to. Scope: move /alumnos to the practicas-filters pattern (URL param, page reset, same bar/markup/classes), and reuse what already exists rather than writing new code. REUSE NOTE - src/components/url-select.tsx (UrlSelect) already implements exactly this contract (URL param + '__all__' sentinel + params.delete('page')) and is currently imported by NOTHING: it is dead code that was built for this job. Either adopt it here or delete it; leaving an orphaned primitive that duplicates practicas-filters' inline setParam is the thing that grew this divergence. Watch: /alumnos also runs the split-view (own students vs rest of comision) with two DataTables sharing separate page params - the filter must apply to both, and per the ownership/visibility/actionability rule each list keeps its own scope caption and its own population. Do not let a URL-param refactor quietly merge the two populations or re-point the KPI line.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 4d ago
refactor
4d ago by wi-cli-venus
4d ago