6.3 KiB
6.3 KiB
UI Plan 2 Implementation Notes
Block 01 Baseline Map
- Sidebar and app shell currently render through
apps/focus_flow_flutter/lib/widgets/sidebar.dart,apps/focus_flow_flutter/lib/widgets/app_shell.dart, and theFocusFlowHomeparts underapps/focus_flow_flutter/lib/app/home/. - Navigation state is not implemented yet.
Sidebarhard-codes Today as active, andFocusFlowHomeowns only Today controllers. UI Plan 2 should add app-level section state in the home/composition layer before rendering the Backlog board. - Backlog board data needs new public scheduler application read models. The
current
BacklogQueryResultis list-shaped and returns rawTaskvalues viaBacklogItemReadModel, which is not enough for board columns, summary, detail drawer metadata, or suggested slot previews. - Existing commands include quick capture to backlog, schedule backlog item to next available slot, move flexible tasks to backlog, remove task, and break up task. Push-to-Someday and non-destructive backlog archive still need command-level decisions before the drawer actions can be final.
- UI Plan 1 components to reuse include
FocusFlowTokens, the dark shell, timeline reward icon, difficulty bars, selected overlay patterns, and the top-bar icon/segmented-control styling conventions.
Block 01 Validation
scripts/bootstrap_dev.sh: passed.dart analyze: passed.dart test: passed.flutter analyzeinapps/focus_flow_flutter: passed.flutter testinapps/focus_flow_flutter: passed.
Block 02 Audit
GetBacklogRequest,BacklogQueryResult, andBacklogItemReadModelremain the compatibility path for the existing simple backlog pane.- UI Plan 2 should add board-specific public read models instead of extending
BacklogQueryResult, because the board needs columns, summary distributions, child previews, detail rows, and suggested slots while the current list result intentionally exposes raw tasks plus staleness markers. - The board bucket policy belongs in pure scheduler backlog code under
packages/scheduler_core/lib/src/scheduling/backlog/, with Flutter consuming only publicscheduler_core.dartexports.
Block 02 Notes/Tags Breakpoint
Adding real V1 task notes and freeform tags is a broad persistence change, not only a drawer read-model change. It would touch at least:
Task,Task.quickCapture, andTask.copyWith.- Task document fields and
TaskDocumentMapping. - Persistence contract field sets and document field coverage tests.
- In-memory application/repository round trips through the full domain object.
- SQLite Drift task table columns, generated database code, schema versioning, migration strategy, migration tests, and both SQLite task mappers.
- Command/capture surfaces if the UI can create or edit notes/tags.
Per UI_PLAN_2_BLOCK_02_BACKLOG_READ_MODELS_AND_METADATA.md, this is the
breakpoint where Ashley needs to choose whether drawer tags should be read-only
placeholders for now or true V1 metadata with a schema migration.
Ashley chose the read-only path for UI Plan 2. Backlog drawer notes remain
null, and tags are derived only from existing narrow backlog metadata for now
(BacklogTag.wishlist displays as someday). True notes and freeform tags are
tracked in Human Documentation/Things to consider todo/Backlog Notes and Freeform Tags Metadata.md for a later migration-backed feature.
Block 02 Board and Detail Queries
GetBacklogBoardRequestandGetBacklogTaskDetailRequestnow expose the public query inputs needed by Flutter without importing schedulersrc/.V1ApplicationManagementUseCases.getBacklogBoardloads backlog candidates, project display metadata, direct child previews, search/filter/sort/group state, bucket policy results, and summary distributions through repository read boundaries only.V1ApplicationManagementUseCases.getBacklogTaskDetailreturns the selected backlog task drawer model, read-only derived tags, project options, and non-mutating suggested slot previews. Missing duration returns a display reason instead of attempting scheduling.- Focused application-management tests cover stable empty columns, bucket and summary consistency, search/filter behavior, child previews, not-found detail responses, read-only slot suggestions, and missing-duration handling.
Block 02 Demo Seed Data
- The Flutter demo composition now seeds Backlog board data as real scheduler
TaskandProjectProfilerecords, not widget-local mock rows. - The seed matches the feasible textual targets from Chunk 2.7: 24 backlog tasks, project counts of Home 5 / Work 8 / Personal 5 / Learning 4 / Side Project 2, priority counts of High 7 / Medium 9 / Low 8, and 12h 15m total estimated time.
- The plan/mockup contains a count conflict: the mockup summary says 24 tasks, while the listed column badge counts add to 22. The current seed keeps 24 repository-backed backlog tasks so the summary target stays truthful through public read models.
Review Q3 budgetis seeded with Work, 60 minutes, High priority, medium reward, and easy difficulty. Finance/review freeform tags, notes text, and exact drawer slot copy remain deferred with the approved metadata scope decision above.
Block 03 Navigation and Screen Shell
FocusFlowSectionnow owns app-level navigation state for Today, Backlog, Projects, Reports, and Settings. The sidebar is controlled by this state and exposes stable active keys for Today and Backlog tests.BacklogBoardControllerloadsBacklogBoardQueryResult, tracks local search/filter/sort/group values, and keeps selected task detail as UI-local state. It uses only public scheduler application read models.- Demo and persistent compositions both create the Backlog controller from the same underlying application store used by Today, so future commands can refresh both surfaces without creating separate fake state.
BacklogBoardScreenrenders the desktop Backlog header, controls, column shells, loading/empty/failure states, and a compact summary panel shell. Detailed cards, charts, and drawer contents remain for later UI Plan 2 blocks.