basquetWi + New ticket
movilba MOVILBA-713

Parque Movil: filtros por empresa, linea e interno en la lista de vehiculos

Done normal cmcoder04-mba-l-ca

Requested in the online tracker (Para Elazar, unticketed row, Estado PENDIENTE): 'Visualizar filtros en parque movil https://dev01.movilba.com/vehiculos, un filtro de empresa - un filtro de linea y por ultimo un filtro por N de interno'. Three filters on the Parque Movil vehicle list, in that order: empresa, linea, numero de interno. Distinct surface from MOVILBA-158 and MOVILBA-163, which are the reportes dashboard and its date-range filters - this is the list screen itself. Open scope questions to settle before coding: whether each filter resolves through the catalog (empresa and linea are catalog-backed, interno is free integer), whether they compose, and whether the filtered set is what the XLSX download button exports (MOVILBA-630 changed that button to serve the full parque, so a filtered export would be a second decision, not an implied one).

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder03-mba-l-cc created · 1w ago
  • coder03-mba-l-cc note · 1w ago
    Tracker row located by proxy-mba-w-cc 2026-10-06 11:59 ART: online Pendientes row 71, A71 empty, Estado PENDIENTE, Para Elazar. The request text 'Visualizar filtros en parque movil https://dev01.movilba.com/vehiculos, un filtro de empresa - un filtro de linea y por ultimo un filtro por N de interno' is in G71, the 'Nuestra respuesta' column, and D71 ('Pregunta') is BLANK. So a stakeholder request was typed into one of OUR annotation columns. That matters beyond tidiness: G is the column we write, so anything there gets quoted back later as our own answer, and a reader filtering on Pregunta does not see this request at all - which is why our 2026-10-06-1139 local snapshot comparison did not surface it. Do not move the text as part of this item's coding work; the cell fix is a tracker edit that needs the same row-identity assertions as any other, and the ref still belongs in A71 because the row IS the item regardless of which column the text landed in.
  • coder04-mba-l-ca decision · 1w ago
    Elazar 2026-10-08: after selecting Empresa, Línea choices show only lines currently assigned to that company (answer 1a). Empresa/Línea use catalog IDs; filters compose with Estado/search; Interno is exact numeric; XLSX remains full-fleet under MOVILBA-630.
  • coder04-mba-l-ca statusChanged · 1w ago
    Implementing agreed Empresa -> assigned Línea -> Interno list filters after MOVILBA-714 deployment clears shared checkout.
  • audit-mba-l-cc audited · 1w ago
    audit pass: docs-only, agents/coder04-mba-l/AGENTS.md, 1 hunk
    payload
    {"scope":"docs-only, agents/coder04-mba-l/AGENTS.md, 1 hunk","outcome":"pass","evidence":"git diff --check clean; added rule matches Elazar's verbatim correction (routine/reversible UI choices don't block, escalate only business-rule/data-meaning/destructive/external-contract); no code/data/DDL touched","reportRef":null}
  • coder04-mba-l-ca note · 1w ago
    Elazar corrected the process: ordinary reversible UI choices, such as narrowing line choices after selecting a company, are for the coding lane to decide from existing product patterns and must not block the item. The durable rule is in agents/coder04-mba-l/AGENTS.md; proceed without further clarification.
  • coder03-mba-l-cc note · 1w ago
    coder03 11:35 ART: fleet parity v5.6.185 on PROD, DEV and pod (pod /api/health patch 185 via proxy-mba-w-cc).
  • coder04-mba-l-ca progress · 1w ago
    Implemented four-path list filter diff: Empresa from allEntities; Línea from lineasByEntidad after company selection; Interno exact nonnegative integer. URL filters compose with Estado/search and reset pagination; count/page share repository predicate. XLSX unchanged, full fleet per MOVILBA-630. Sent to audit for gates and read-only query check; no tests/lint/typecheck run by coder lane.
  • audit-mba-l-cc audited · 1w ago
    audit fail: typecheck+lint(4 files)+test:source(64/64) pass; drizzle and()-all-undefined verified =no-WHERE; PROD composed entidad+linea count checked
    payload
    {"scope":"typecheck+lint(4 files)+test:source(64/64) pass; drizzle and()-all-undefined verified =no-WHERE; PROD composed entidad+linea count checked","outcome":"fail","evidence":"vehiculos.ts:383-384 resolves lineaId->lineas.numeroLinea then inArray(view.numeroLinea,...); numeroLinea unique only WHERE borrado_en IS NULL (uq_lineas_numero_linea_active), so a retired line can share a number with an active one - view.numeroLinea is itself COALESCE(linea_actual,hist_ultimo), so a vehicle's past line-number can collide with a different, currently-active line's number. Same anti-pattern tools/tests/colectivo-owner-options.test.cjs already guards against (numero predicates vs id/membership) for a different route. No live collision in PROD today (checked lineas for numero shared between an active and a borrado row - 0 rows) but the schema permits it by design, so this is latent, not hypothetical.","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Audit found line-number alias collision risk. Corrected repository predicate to filter vehicle IDs from v_vehiculos_linea_actual where linea_id equals selected catalog ID; same current/history source as list view. Four-file diff sent for re-audit; count/page share predicate. No gate run by coder lane.
  • audit-mba-l-cc audited · 1w ago
    audit pass: typecheck+lint(4 files, clean after unused-import fix)+test:source(64/64); PROD re-check entidad65+linea131 via corrected join
    payload
    {"scope":"typecheck+lint(4 files, clean after unused-import fix)+test:source(64/64); PROD re-check entidad65+linea131 via corrected join","outcome":"pass","evidence":"lineaId filter now inArray(view.id, select vehiculoId from v_vehiculos_linea_actual where linea_id=lineaId); that view is a pure passthrough of v_vehiculos_hist_ultimo, the same source v_vehiculos_list's COALESCE uses on both branches - no numero_linea comparison, no collision risk. Direct SQL join reproduces the prior count (104) for entidad_id=65/linea_id=131.","reportRef":null}
  • coder03-mba-l-cc note · 1w ago
    coder03 12:15 ART: deployed PROD+DEV v5.6.189; pod leg requested.
  • coder04-mba-l-ca completed · 1w ago
    Done. Four-file Empresa→Línea→Interno list filters audit PASS; corrected lineaId membership predicate avoids retired line-number collisions. PROD query control entidad65+linea131 returns 104, count/page share predicate. Deployed v5.6.189 and carried through current v5.6.199 on PROD, DEV and pod. XLSX remains full fleet per MOVILBA-630.
feature
1w ago by coder03-mba-l-cc
1w ago
2026-10-08 17:59