Phase 8: unified day log becomes the only logging surface, superseded screens removed - #187
Merged
Merged
Conversation
…metric helpers - Screen.LogDay gains optional categoryId (focus a category's input) and logId (load one specific log for in-place editing) arguments; builders forCategory and forLog added. This closes the Phase 5 deviation: editing one particular same-day log of an allow-multiple category is now possible on the unified day screen, so the old per-category screen has no unique capability left. - LogViewModel consumes the two deep links one-shot on first load: focus expands the category, and an edit target pins that exact log into its category's entry (existingLog set), so Save updates it in place and Delete entry removes exactly it. - Screen.LogPeriod and Screen.LogCategory route definitions removed (registrations and entry points follow in the next commits). - DatePickerDialogWrapper consolidated into one shared component in ui/components (was private per screen); LogScreen now uses it. - metricConfigFor and TimedIncrementTimeline moved out of LogCategoryScreen.kt into ui/screens/log/MetricSupport.kt so the unified screen keeps them after the old screen is deleted. Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg Co-authored-by: Claude <noreply@anthropic.com>
- Home calendar quick log: a period tap and a category tap both open
log_day (category taps focus that category); instant Plus One increments
are unchanged.
- Home speed dial: Log Period and every category item open the day screen
for the targeted date, categories focused.
- Day sheet: the day-log row is now the standard action ("Open day log",
no longer a preview); Period edit opens the day screen for that day, and
a tracked entry's edit opens the day screen targeting that exact log.
- Quick Log widget deep link opens today's day screen with the tapped
category focused (the PIN-lock neutral-placeholder widget behaviour is
untouched).
- Period detail: the top-bar action now opens the unified day screen on
the episode's first day ("Open first day").
- log_day registration gains the categoryId/logId deep-link arguments.
Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg
Co-authored-by: Claude <noreply@anthropic.com>
Deleted, each matched to its proven replacement on the unified day screen: - LogPeriodScreen.kt + LogPeriodViewModel.kt (day editing, episode dates, flow, symptoms, pinned categories, notes, remove-day, delete-period, disable-period-tracking, unsaved-changes guard all live on LogScreen; the save fan-out and widget/reminder refreshes go through the shared PeriodDaySync/PeriodRepository paths LogViewModel already uses). - LogCategoryScreen.kt + LogCategoryViewModel.kt (per-type inputs render through MetricInput on LogScreen; per-entry notes, delete, previously recorded chips, track-against-time, timed-increment timeline all exist there; editing one specific log now goes through the logId deep link). - PinnedCategoryInput and the two private DatePickerDialogWrapper copies died with those files (the wrapper lives on as the shared component). - LogEntryTopBar.kt: both of its callers are gone. - MainActivity: log_period and log_category registrations and imports removed; PeriodDaySync and ReminderPreferences comments updated. PeriodDaySync, AddSymptomDialog, and every repository method the new surfaces use are kept. Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg Co-authored-by: Claude <noreply@anthropic.com>
…o the edit flow - AddCategoryDialog, EditAppearanceDialog, and RenameCategoryDialog (superseded by CategoryEditScreen since Phase 7, kept unreferenced under @Suppress("unused")) are deleted, along with the helpers only they used: CategoryColorPicker, CategoryIconGrid, and NumericSettingsSection. - FullColorPickerDialog (+ its SaturationValuePanel/HueSlider internals) and the isFixedColorToken/isCustomColorToken helpers, still live for CategoryEditScreen's custom colour slot and the adopt-colour rules, move to their own CategoryColorPickerDialog.kt. - ManageCategoryValuesScreen: the per-type settings sections that duplicated the edit flow (slider range/step labels/decimals/unit, free numeric unit, and the log-with-period / allow-multiple / track-against-time switches) are consolidated into the Edit action, which provably covers each of them. The screen keeps what only it does: the value catalog CRUD (add/rename/fix-history/delete with seeded-value protection), the built-in Flow chips/slider switch, the alarms section, and archive/delete. Info sections point at the Edit action. - Dead ViewModel methods removed: ManageCategoriesViewModel.addCategory and .updateCategoryAppearance; ManageCategoryValuesViewModel .renameCategory, .updateAppearance, .updateNumericSettings, .updateUnit, .setShowInLogPeriod, .setAllowMultiple, .setTrackAgainstTime. Repository methods stay untouched. Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg Co-authored-by: Claude <noreply@anthropic.com>
- PLAN.md: status line updated, section 7 Phase 8 row recorded as Done (branch, DB 24 unchanged, owner parity sign-off 2026-08-28, full removal/relocation list, deviations). - Subsystem maps 01/02: Phase 8 drift notes marking the removed files and the new log_day deep links; map 01's per-screen sections kept as the historical record. - LESSONS.md: two transferable lessons (delegate-operator imports vs text-based import scrubbing; the supersede-and-annotate deletion staging pattern). - Changelog fragment (minor bump). Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 8: cleanup and removal (final phase of the logging redesign)
Gated on the owner's parity sign-off (recorded 2026-08-28 in PLAN.md section 7). Every removal below is matched to a proven replacement; PLAN.md section 3 is the contract and is walked in full at the end.
Prerequisites #185 and #186 were already merged to main (v0.57.0-beta.1), so this branch is cut straight from main and the diff contains only Phase 8 work.
What changed
1. Entry points flipped to
log_daycategoryIdargument; instant Plus One increments are unchanged.GoFloWidget.ktnot in this diff).Screen.LogPeriod.withIdreference.2. Parity gap closed before deletion (Phase 5 deviation)
Editing one specific same-day log of an allowMultiple category previously still routed to LogCategory.
log_daynow acceptslogId: LogViewModel loads that one log as its category's entry withexistingLogset, so Save goes throughupdateLogInPlaceand "Delete entry" removes exactly that log. The day sheet's per-entry edit uses it. The deep links are one-shot (consumed on first load); switching day reloads normally.3. Removed (each verified reference-free by grep before and after)
LogPeriodScreen.kt+LogPeriodViewModel.kt(incl.PinnedCategoryInput,SectionLabel, its privateDatePickerDialogWrapper)LogCategoryScreen.kt+LogCategoryViewModel.kt(incl.DateSelectorCard, its privateDatePickerDialogWrapper)LogEntryTopBar.kt(orphaned once both callers were gone)Screen.LogPeriod,Screen.LogCategoryand theirMainActivityregistrations and importsAddCategoryDialog,EditAppearanceDialog,RenameCategoryDialog(superseded since Phase 7, annotated@Suppress("unused")) and their orphaned helpersCategoryColorPicker,CategoryIconGrid,NumericSettingsSectionManageCategoriesViewModel.addCategory/.updateCategoryAppearance;ManageCategoryValuesViewModel.renameCategory/.updateAppearance/.updateNumericSettings/.updateUnit/.setShowInLogPeriod/.setAllowMultiple/.setTrackAgainstTime4. Relocated / consolidated (not removed)
metricConfigFor+TimedIncrementTimelinemoved toui/screens/log/MetricSupport.kt(LogScreen consumes them)DatePickerDialogWrapperconsolidated into one sharedui/components/DatePickerDialogWrapper.ktFullColorPickerDialog+SaturationValuePanel/HueSlider+isFixedColorToken/isCustomColorTokenmoved toui/screens/categories/CategoryColorPickerDialog.kt(still used by CategoryEditScreen's custom colour slot and the adopt-colour rules)ManageCategoryValuesScreen: per-type settings sections that duplicated the edit flow (slider range/step labels/decimals/unit, free-numeric unit, and the log-with-period / allow-multiple / track-against-time switches) are consolidated into the Edit action, which provably covers each (CategoryEditScreen step 2 + unit field + Options card, incl. system Flow in slider mode). The screen keeps what only it does: value catalog CRUD, the built-in Flow chips/slider switch, the alarms section, archive/delete, and now points at Edit for the rest.5. Kept deliberately
PeriodDaySync(flow mapping + the save fan-outsyncFlowToTrackingLog/syncSymptomsToTrackingLog/computePinnedValues; also used by PeriodDetailViewModel),AddSymptomDialog, widget + reminder refresh on save,SelectableChip, all repository methods (a few setters, e.g.updateNumericSettings, now have no UI caller but stay as data-layer API per the phase guide's do-not-remove rule),CustomAlarmsystem, tracking modes, quick-log, export, Stats/History.PLAN.md section 3 preservation walk (verified by inspection on the finished tree)
Logging
LogScreenrenders every category throughMetricInput(CategoryMetricSection/MetricSectionBody); chips (default), stepped scale/slider (numeric_slider), free numeric with unit (numeric_free), count stepper (increment), timed increment with per-tap timestamp + timeline (TimedIncrementTimelineinMetricSupport.kt, per-tap saves inLogViewModel.addTimedIncrement).LogScreen.MetricSectionBody(default type).MetricSectionBody. Edit an existing log: non-allowMultiple entries load automatically; a specific allowMultiple log via thelogIddeep link. Delete a log: "Delete entry" with confirmation. Date selection: title sheet "Change day" + Day card (replacescanEditDate; alogIdtargeting is dropped on day switch, matching the old screen's fixed-date rule for by-id edits).PeriodDatesSection), ongoing null end ("Still ongoing", "Clear end date"), flow slider or chips with the 1→Spotting/2→Light/4→Heavy/else Medium mapping (FlowSection+PeriodDaySync), symptoms chips + inline Add viaAddSymptomDialogwriting to the value catalog (SymptomsSection,addNewSymptomToLibrary), pinnedshowInLogPeriodcategories in the flow context, episode notes.LogViewModel.init), episode day number (top bar + Day section), range vs open-ended (logPeriodRangevslogPeriodDayinsave()), "Remove this day", "Delete Entire Period", "Disable period logging" (overflow menu).BackHandler+ save/discard dialog onLogScreen(now also guards day switches).PeriodDaySync.syncFlowToTrackingLog/.syncSymptomsToTrackingLog/.computePinnedValuesinLogViewModel.save()(unchanged since Phase 5).GoFloWidget.updateAllWidgets+ReminderScheduler.refreshPredictionReminderson period saves, day removal, and episode deletion.Categories & management
CategoryEditScreen(create + rename + delete-with-history),ManageCategoriesScreenswipes + reorder mode,ManageCategoryValuesScreenmenu.CategoryEditScreen(mode key carried throughCategoryEditViewModel.save).ManageCategoryValuesScreen(kept).ModesScreenuntouched.ManageQuickLogScreenuntouched; widget increment broadcast unchanged; non-increment taps open the day screen focused.ManageCategoryValuesscreen: kept (value editing); per-type settings consolidated into Edit per section 4 above.Theme & colour
wcag_check.pygreen).Other surfaces
Needs device pass (new or rerouted behaviour that inspection cannot fully confirm):
logIddeep link end to end: day sheet edit of one allowMultiple entry, in-place save, targeted delete.categoryIdfocus behaviour from the widget deep link and speed dial (expanded input inside grouped cards).Evidence and checks
LogPeriodScreen,LogPeriodViewModel,LogCategoryScreen,LogCategoryViewModel,PinnedCategoryInput,LogEntryTopBar,DateSelectorCard,Screen.LogPeriod,Screen.LogCategory,log_period,log_category,AddCategoryDialog,EditAppearanceDialog,RenameCategoryDialog,CategoryIconGrid,NumericSettingsSection, the removed VM methods,newEntryForDate,.editEntry(,withId(): zero hits (the onlylog_categorymatch is the unrelated DataStore keyquick_log_category_id).MainActivityregisters no dead route.python3 a11y_check.py: clean.python3 wcag_check.py: clean. Semantics-import sweep over all main-set Kotlin files: clean. Changelog fragment validated bycheck_changelog_fragment.pyagainst origin/main.logging-redesign-cleanup.json(minor bump).🤖 Generated with Claude Code
https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg
Generated by Claude Code