Android: time range sheet, All shards screen, shards in the stream #285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #277. Needs #284.
04-time-range-sheet.png06-all-shards.pngAs in #284, the screenshots give content and behaviour, drawn in Material 3 Expressive.
Goal
The time range sheet behind the label of the range pill, the All shards screen behind "Show all N shards", and "Show shards in stream" of the ⋮ menu.
Plan
Time range sheet (
ui/ActivityRange.kt;04)ModalBottomSheettitled "Time range" with Apply. A tap on the scrim cancels.2026-10-03..2026-10-17), parsed as it is typed throughactivityRange(decided in #277: typed input is parsed). Below it are the resolved dates2026-10-03 → 2026-10-17and "15 days · to today", or the error of the core. The line of examples gets a label ("e.g."), and each example is a chip that fills the field.PrimaryTabRow; All first, no Quarter, no Range tab):activityQuickPicks: Today · Yesterday · Last 7 days · Last 30 days · This month · Last month · This year · Last year · All time.All shards (
ui/ActivityShards.kt;06)offset/limitofactivity, a page of 50; open question 6 of the spec).Show shards in stream
Sport · Oct 2026 ✕above the cards and only the cards of files holding a matching shard. The filter is a plain list of file ids from the report; the Stream keeps no knowledge of activities.Tests
Pure: the two-tap range of the Days tab (either order, the same day twice, a future day refused), the months and years offered, the grouping by day, the page loading. Screenshot tests: the sheet on each tab (
@TallScreenshotsif needed), the All shards screen with a filter, and the Stream with the filter chip.Docs
R35 (the app), README, AGENTS.md.
Implementation plan
Build on #284 / PR #309 and the behavior in this issue's description. #284 must be merged before implementation branches from main. At refinement time #284 remains open. Use Material 3 Expressive, existing app components and the prototype's content/behavior.
Decisions and clarified defaults
Clarification was requested about filter persistence and data-access strategy. No answer was received before recording this plan, so these are explicit implementation defaults:
1. Core selection and bindings, tested first
Current api::activity pages computed.matches before reading summaries. Its page has no series selector, and the generic activityRange(text, today) resolves all as today alone. Address those gaps through the core:
Exact helper names can follow local conventions; the contracts above are the required behavior.
2. App adapters and immutable UI data
Extend core/Activity.kt, StreamSession and StreamViewModel; StreamSession remains the app's only binding caller:
3. Range sheet and pending state
Add ui/ActivityRange.kt with an effect-owning sheet wrapper and internal content composable; pure selection helpers belong in a separate helper file:
4. All shards destination and paging
Add ui/ActivityShards.kt and an ActivityShardsRequest route, following NoteRequest's encoding conventions:
5. Show shards in Stream
Enable the Activity overflow action and extend ActivityActions/Shell navigation:
6. Tests and acceptance
Use London-style TDD in small signed conventional commits: interface fakes for sheet/pager/navigation contracts, core MemoryStore tests for selection, then screenshot scenes.
7. Documentation and delivery
Update README.md, REQUIREMENTS.md R35 (and R36 API contracts where applicable), AGENTS.md and relevant docs: the new core/FFI methods, adapter records, routes, sheet/pager behavior and file-filter ownership. Replace #284's deferred/no-op descriptions with the implemented actions. #286 stays separate.
Run targeted Rust/core/FFI tests, the Kotlin binding check, app JVM/screenshot validation and the full nix build .#streamd-app. Finish with nix flake check. No new Maven dependency is expected; regenerate android/deps.json if dependencies/plugins change.
Follow the implement workflow for the branch from latest main after #284 merges, focused signed commits through nix develop, push, Forgejo PR, and the implementation findings/time/token-availability note.