summaryrefslogtreecommitdiff
path: root/android/app/src/test/java/org/terst
AgeCommit message (Collapse)Author
2026-08-06Widget: ship Material You theming, past-events restructuring, legibility ↵Peter Stone
fixes, new settings This lands the color-theming work that had sat uncommitted since a prior session (2026-07-28) -- every build published in between stripped it out deliberately to avoid shipping unreviewed work -- plus a full round of fixes and new features layered on top since it finally shipped: Theming (WidgetPalette.kt, new): - 5 themes now: NEUTRAL/ACCENT/TONAL (wallpaper-derived via Material You), VIVID (new -- all three text roles pull from a different accent slot instead of anchoring primary to neutral, for real hue variety), CLASSIC (fixed, wallpaper-independent). - Settings picker redesigned to match Android's native wallpaper "Basic colors" circular swatches (bottom half + two top quadrants, filled with each theme's actual buildWidgetPalette() output, not an approximation). - Per-source accent colors (colored checkboxes/bars) fully removed from the grid. Past events (DootWidget.kt, WidgetRows.kt): - Already-ended-today events pulled out of the hourly grid, shown as list rows above it instead (matching how past tasks already float) -- fixes the grid's start hour getting stretched backward by stale events. Legibility (WidgetRows.kt): - ShadowedText upgraded from a single-corner drop shadow to a 4-corner halo/outline (protects all sides of a glyph, not just one). - Halo color now tracks each palette's text luminance (dark halo for light text, light halo for dark text) -- a hardcoded black halo behind already-dark light-mode text was doing essentially nothing. Bumped opacity 0.45/0.55 -> 0.65/0.7 as the cheap, low-risk strength dial. New settings (SettingsActivity.kt, DataStore.kt): - Background transparency slider (0-85%, default 0% unchanged) -- exposed for testing per explicit request, not a default change. - Hide-checkboxes toggle: drops the leading checkbox/dot element entirely (not just hides the icon) so task titles land flush with event titles; tap-to-complete-from-widget trades off for TaskDetailActivity's Complete button. Also: today's moon phase in the TODAY header (moonPhaseEmoji, pure date computation, no network) -- verified against direct calculation before writing test assertions, not hand-computed. Removed the unused glance-material3 dependency (verified zero usages before removing; turned out to save ~2KB, not the ~280KB expected, since material3 itself already pulls the same transitive deps -- noted honestly rather than oversold). Every new pure-logic piece has unit tests (isPastEvent, moonPhaseEmoji, theme construction) -- 59 total, all green. Verified installable and crash-free via a real API 36 emulator launch before each publish, not assumed. Deployed as doot-widget.apk.
2026-08-06Widget: add postpone (tomorrow/next week/next month) to task detail popupPeter Stone
Alongside Complete/Edit, doot-native tasks now get a Postpone button with a dropdown (Tomorrow / Next week / Next month), reusing the existing reschedule wiring (WidgetRepository.reschedule) the due-date picker already uses. Caught and documented a real divergence while writing the test: Java's LocalDate.plusMonths CLAMPS to the target month's last valid day (Jan 31 -> Feb 28), while the Go server's ComputeNextOccurrence (recurrence math) OVERFLOWS instead (Jan 31 + 1 month -> Mar 3) via time.AddDate. Verified by actually running both, not assumed -- a first draft of this test asserted the wrong (Go-style) behavior before checking. Not reconciled here, just accurately documented as a known inconsistency between this client-side helper and the server's date math. 4 new tests, all passing.
2026-08-05Widget: fix "complete works once, then stops" race between overlapping ↵Peter Stone
completions Root cause traced from server logs, not guessed: every completion request was succeeding server-side (100% 200s, including a 5-tap burst spanning different tasks), and each successful completion's response payload was correctly shrinking. So the failure wasn't dispatch or network -- it was that a successful completion could still get silently undone client-side. fetchAndPersist does an unconditional full overwrite of the cached item list on every successful GET. CompleteWorker/DeferWorker run one instance per task id with no ordering guarantee between different ids' workers (different unique work names, no KEEP protection across them -- that protection only ever covered same-task double-taps). So: tapping complete on task A starts a GET that's still in flight; tapping complete on task B before A's GET returns optimistically removes B locally; A's slower GET response, captured before B's completion landed, then overwrites the cache and silently resurrects B. Fix: track locally-optimistic removals with a timestamp (PendingRemovals.kt) and filter them out of every fetchAndPersist write for a bounded TTL (2 min), regardless of which worker's fetch is doing the writing. The TTL means a completion that never actually confirms (permanent network failure) still self-heals via the next periodic refresh, matching an existing self-healing property already relied on elsewhere in this codebase, instead of hiding the task forever. Added PendingRemovalsTest.kt (pure-function unit tests, no Android runtime needed) covering the exact race scenario plus TTL expiry and edge cases. Verified the tests actually catch a regression by deliberately reverting the fix to a no-op against a real backup, confirming 3 tests failed with the exact expected assertion, then restoring and confirming green again. Built, tested, and published as doot-widget.apk.
2026-07-16feat(widget): add Android data layer for projects and label colorsPeter Stone
2026-07-16feat(widget): add description linkification for URLs and phone numbersPeter Stone
2026-07-16feat(widget): add WidgetRepository methods for task detail/recurrencePeter Stone
2026-07-16fix(widget): scale content font sizes down 5% across all text-size tiersPeter Stone
2026-07-16feat(widget): show multi-day calendar events on every day they spanPeter Stone
Multi-day events (Start and End on different calendar days) are pulled out of the normal grid/all-day pipeline and rendered as an all-day-style row on every day they touch (Today and/or Tomorrow), labeled starts/ends/plain per the day being rendered. Previously such an event either only appeared in the single hourly grid slot matching its start time (never again on later days) or, if genuinely flagged all-day, never had its End forwarded at all.
2026-07-16fix(widget): floor header text size/weight at NORMAL even when SMALLPeter Stone
Headers (hour labels, section titles) shrinking along with content at the SMALL setting made them too small relative to content. Content still shrinks at SMALL; headers now stay at NORMAL's scale/weight regardless of the selected tier.
2026-07-16feat(widget): add WidgetTextSize enum with independent header/content scalingPeter Stone
2026-07-16test(widget): pin JVM default timezone in DootWidgetGridTest for determinismPeter Stone
2026-07-16fix(widget): stop tomorrow's events from stretching today's grid boundsPeter Stone
calcGridStart/calcGridEnd only looked at hour-of-day, so a tomorrow event's early or late hour could inflate today's grid range with empty rows, pushing the non-scrolling TomorrowSection below the widget's visible area. Filter to today-only events before computing bounds.
2026-06-29fix: resolve Glance ColorProvider import, Box content lambdas, OkHttp Call ↵Peter Stone
import in tests
2026-06-29feat: Android widget — SlotPacker, WidgetRepository, Workers, Glance UI, ↵Peter Stone
SettingsActivity