2035-validate-filters-form-load-sr
Fixes Issue #2035 (DEV - validate filters form and load SR data on form submit)
Status
- Implemented form validation logic, UI, and data flow, for all inputs (Address, Council, Date, Request Types, Request Status)
- Implemented all Dev ToDo Items from Issue #2035
- Most Up To Date Change on recent comments in Issue #2035
Implemented Changes
Action Items
- [x] Up to date with
mainbranch - [x] Branch name follows guidelines
- [ ] All PR Status checks are successful
- [ ] Peer reviewed and approved
This branch conflicts with main in src/features/Map/index.jsx, but the real issue is not the conflict itself. The conflict is a symptom of two different data-loading contracts: current main still assumes the existing startup/refresh flow in Map/index.jsx, while this PR is trying to convert that component to a submit-driven Blank Map flow using an older copy of the file. I’d recommend resolving the conflict by starting from the current main version of Map/index.jsx, then re-applying only the intended Blank Map submit-flow changes on top of that newer base.
Merge conflict context and recommended resolution
I walked the merge locally to see what kind of conflict this actually is. The good news is that the merge only produces a direct content conflict in one file, src/features/Map/index.jsx.
The important part is that this is not a simple “pick ours vs. pick theirs” conflict. main and this PR are carrying different assumptions about how Map/index.jsx is supposed to load and refresh request data.
1. What changed on main
On the main side, src/features/Map/index.jsx has been updated recently to support the current year-specific data-loading flow. In the current origin/main version, the component imports DATA_SOURCE plus getServiceRequestHF / getServiceRequestSocrata, creates the request table during componentDidMount(), and refreshes data during componentDidUpdate() when mode/date/council inputs change.
Two recent PRs matter here. PR #2075 (“Fix unit tests and parameterize dataset year”) removed the fallback-to-prior-year behavior and simplified createRequestsTable() so it loads the selected year directly instead of mutating dates on fallback. The review discussion on that PR explicitly says the newer Blank Map designs made the fallback behavior unnecessary. PR #2081 then patched the same file to set isTableLoading back to false once the request table is created, so the loading modal would not hang indefinitely.
2. What your PR is trying to do
On this PR’s side, src/features/Map/index.jsx is modifying an older version of the file to implement the submit-driven Blank Map behavior from issue #2035.
Specifically, it comments out the startup calls to createRequestsTable() and setData() in componentDidMount(), comments out the existing automatic refresh path in componentDidUpdate(), and replaces that path with a shouldDisplayData flag that only runs the load after the new Display Data action is triggered.
That is a legitimate direction for this ticket, but it is being layered onto a stale copy of Map/index.jsx, so the merge conflict is really between “current main’s data-loading contract” and “this PR’s submit-only data-loading contract.”
3. What changed and why it conflicted
There is also longer-running feature context here. The Blank Map/request-table direction traces back to PR #1952 (“One request table v2 1891”), which fixed issue #1891. That issue and its comments make it clear that one of the goals was a Blank Map flow where the app can initialize without loading request data on startup. The approval comment on #1952 even calls out that the map loads immediately because no data is requested on start.
So conceptually, this PR is moving in a direction that has precedent in the project. The problem is that main has continued evolving Map/index.jsx since then, especially through #2075 and #2081, and this branch is no longer merging cleanly against that current shape.
Recommended resolution
Because of that, I would recommend resolving the conflict by starting from the current main version of src/features/Map/index.jsx, not from this PR’s version. Then re-apply only the intended Blank Map submit-driven changes on top of that newer base.
In practice, that means preserving the current main imports, DATA_SOURCE handling, and the current createRequestsTable() shape, while selectively re-introducing the submit-trigger mechanism from this PR. I would also preserve the #2081 loading-modal fix, and update any startup consumers that still assume request tables exist on page load.
That last point matters because I tested this locally and hit a real startup failure after following this PR’s flow: LastUpdated.jsx still queries DuckDB on startup and throws Table with name requests_2025 does not exist! before any Display Data action has been taken. So the merge conflict is only one file, but the correct resolution is not just about making Git happy. It also needs to reconcile the broader load contract across the app.
After the conflict is resolved, I’d re-test initial page load, LastUpdated / other startup DuckDB consumers, address search, council selection, the Display Data submit flow, and Export enablement after a successful fetch/load before asking for another review pass.