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
54 lines
1.9 KiB
Dart
54 lines
1.9 KiB
Dart
// SPDX-FileCopyrightText: 2026 FocusFlow contributors
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
/// Composes the FocusFlow Flutter application around Focus Flow App.
|
|
library;
|
|
|
|
import 'dart:async';
|
|
|
|
import 'package:flutter/material.dart';
|
|
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';
|
|
import '../models/today_screen_models.dart';
|
|
import '../theme/focus_flow_theme.dart';
|
|
import '../theme/focus_flow_tokens.dart';
|
|
import '../widgets/app_shell.dart';
|
|
import '../widgets/backlog_pane.dart';
|
|
import '../widgets/dialogs/settings_dialog.dart';
|
|
import '../widgets/required_banner.dart';
|
|
import '../widgets/sidebar.dart';
|
|
import '../widgets/task_selection_modal.dart';
|
|
import '../widgets/timeline/timeline_view.dart';
|
|
import '../widgets/top_bar.dart';
|
|
import 'scheduler_app_composition.dart';
|
|
|
|
part 'home/focus_flow_home.dart';
|
|
part 'home/focus_flow_home_state.dart';
|
|
part 'home/plan_issue.dart';
|
|
part 'home/today_screen_scaffold.dart';
|
|
part 'home/today_screen_scaffold_state.dart';
|
|
|
|
/// Root Material app for the FocusFlow desktop UI.
|
|
class FocusFlowApp extends StatelessWidget {
|
|
/// Creates a FocusFlow app from an application composition.
|
|
const FocusFlowApp({required this.composition, super.key});
|
|
|
|
/// Factory and controller bundle used by the app tree.
|
|
final SchedulerAppComposition composition;
|
|
|
|
/// Builds the widget subtree for this component.
|
|
/// The method translates the current widget configuration and state into Flutter UI without mutating scheduler domain data.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'FocusFlow',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: FocusFlowTheme.dark(),
|
|
home: FocusFlowHome(composition: composition),
|
|
);
|
|
}
|
|
}
|