Adds a getOwnerSettings read query to scheduler_core (previously only an internal helper existed) and an updateOwnerSettings command on the Flutter command controller, then builds a shared Settings dialog surfacing timezone, day window, compact mode, and backlog staleness thresholds. Both existing no-op entry points (sidebar nav item, top bar button) now open the same dialog and persist edits through the existing OwnerSettings/BacklogStalenessSettings backend. Per the design spec (circuitforge-plans/focus-flow/superpowers/specs/ 2026-07-07-settings-screen-design.md), the compact-mode toggle persists but is disclosed in-UI as not yet affecting Today rendering, since that wiring is separate scope (#11). Closes: #16
50 lines
1.7 KiB
Dart
50 lines
1.7 KiB
Dart
// SPDX-FileCopyrightText: 2026 FocusFlow contributors
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
/// Defines the app composition protocol used by FocusFlow widgets.
|
|
library;
|
|
|
|
import 'package:scheduler_core/scheduler_core.dart';
|
|
|
|
import '../controllers/scheduler_command_controller.dart';
|
|
import '../controllers/scheduler_read_controller.dart';
|
|
import '../controllers/selected_date_controller.dart';
|
|
import '../controllers/today_screen_controller.dart';
|
|
|
|
/// Runtime-independent composition surface consumed by the app shell.
|
|
abstract interface class SchedulerAppComposition {
|
|
/// Human-readable label for the selected local date.
|
|
String get dateLabel;
|
|
|
|
/// Initial selected owner-local planning date.
|
|
CivilDate get initialDate;
|
|
|
|
/// Default project id used by quick-capture commands.
|
|
String get defaultProjectId;
|
|
|
|
/// Formats [date] for compact UI date labels.
|
|
String dateLabelFor(CivilDate date);
|
|
|
|
/// Creates the controller that owns the visible planning date.
|
|
SelectedDateController createSelectedDateController();
|
|
|
|
/// Creates the controller used by the compact Today screen.
|
|
TodayScreenController createTodayScreenController({
|
|
required SelectedDateController selectedDates,
|
|
});
|
|
|
|
/// Creates a read controller for the backlog screen.
|
|
UiReadController<BacklogQueryResult> createBacklogController();
|
|
|
|
/// Creates a read controller for the settings screen.
|
|
UiReadController<OwnerSettings> createOwnerSettingsController();
|
|
|
|
/// Creates the command controller used by interactive scheduler controls.
|
|
SchedulerCommandController createCommandController({
|
|
required ReadRefresh refreshReads,
|
|
required SelectedDateReader selectedDate,
|
|
});
|
|
|
|
/// Releases resources owned by the composition.
|
|
Future<void> dispose();
|
|
}
|