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
The construction diary list currently defaults to showing All entries (both manual and automatic). The desired behavior is that the default filter should be Manual entries only.
Current Behavior
When opening the diary page with no filterMode URL search parameter, the list shows all entries (manual + automatic).
Expected Behavior
When opening the diary page with no filterMode URL search parameter, the list should default to showing Manual entries only. Users can still switch to "All" or "Automatic" via the filter control.
Technical Context
File: client/src/pages/DiaryPage/DiaryPage.tsx, line 48
Current code: const filterMode = (searchParams.get('filterMode') as FilterMode) || 'all';
The filter is controlled via the URL search parameter filterMode
Given a user navigates to the construction diary page with no filterMode URL search parameter, When the list loads, Then the active filter is "Manual" and only manual entries (daily_log, site_visit, delivery, issue, general_note) are displayed.
Given a user is on the diary page with the default "Manual" filter, When they view the filter control, Then "Manual" is shown as the currently selected/active option.
Given a user explicitly selects the "All" filter, When the list refreshes, Then both manual and automatic entries are displayed and the URL reflects filterMode=all.
Given a user explicitly selects the "Automatic" filter, When the list refreshes, Then only automatic entries (work_item_status, invoice_status, invoice_created, milestone_delay, budget_breach, auto_reschedule, subsidy_status) are displayed and the URL reflects filterMode=automatic.
Given a user navigates to the diary page with an explicit filterMode=all (or automatic) URL search parameter, When the list loads, Then the parameter is honored and the corresponding filter is applied (the default only applies when no parameter is present).
Notes
This is a default-value change only; the existing filter UI and URL-parameter handling remain unchanged.
Switching the default may affect any E2E tests that assume "All" entries are visible on initial load — verify and update test expectations as needed.
Bug Report
The construction diary list currently defaults to showing All entries (both manual and automatic). The desired behavior is that the default filter should be Manual entries only.
Current Behavior
When opening the diary page with no
filterModeURL search parameter, the list shows all entries (manual + automatic).Expected Behavior
When opening the diary page with no
filterModeURL search parameter, the list should default to showing Manual entries only. Users can still switch to "All" or "Automatic" via the filter control.Technical Context
client/src/pages/DiaryPage/DiaryPage.tsx, line 48const filterMode = (searchParams.get('filterMode') as FilterMode) || 'all';filterModeFilterModetype:'all' | 'manual' | 'automatic'daily_log,site_visit,delivery,issue,general_notework_item_status,invoice_status,invoice_created,milestone_delay,budget_breach,auto_reschedule,subsidy_statusAcceptance Criteria
filterModeURL search parameter, When the list loads, Then the active filter is "Manual" and only manual entries (daily_log,site_visit,delivery,issue,general_note) are displayed.filterMode=all.work_item_status,invoice_status,invoice_created,milestone_delay,budget_breach,auto_reschedule,subsidy_status) are displayed and the URL reflectsfilterMode=automatic.filterMode=all(orautomatic) URL search parameter, When the list loads, Then the parameter is honored and the corresponding filter is applied (the default only applies when no parameter is present).Notes