app.dart was 1187 LOC mixing five concerns. It now keeps ClideApp + the WidgetsApp root (~60 LOC); the shell moved to lib/src/shell/: - root_shell.dart — keyboard/intent routing (keymap resolution, double-tap modifiers, menu mnemonics), the overlay stack, and the welcome overlay - hat_bar.dart + project_switcher.dart — the window-chrome bar and its recents/file-actions dropdown (now in src/shell, not builtin/ — they're app chrome, not extension-shaped contributions) - slot_host.dart — slot mounting, focus-scope integration, the per-slot bodies incl. the workspace split + editor drag handle; _SlotBody's static title resolver became the shared resolveTabTitle - layout.dart — the three-column grid, status bar, collapse toggles, bottom icon rails app.dart re-exports RootLayout, SlotHost, StatusbarHost, and StatusbarCollapseToggle, so every existing import (incl. the three app-level test files) is unchanged. Pure move + minimal publics (RootShell, HatBar, ProjectSwitcherButton); full suite green with no test edits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
48 lines
1.5 KiB
Dart
48 lines
1.5 KiB
Dart
/// App entry widget. The shell itself lives under `lib/src/shell/`
|
|
/// (T-394 split): keyboard routing in root_shell.dart, the hat bar +
|
|
/// project switcher, slot hosting, and the layout grid + status bar.
|
|
/// The public layout symbols are re-exported here so existing imports
|
|
/// of `package:clide/app.dart` keep working.
|
|
library;
|
|
|
|
import 'package:clide/clide.dart' show clideName;
|
|
import 'package:clide/kernel/kernel.dart';
|
|
import 'package:clide/src/shell/root_shell.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
export 'package:clide/src/shell/layout.dart' show RootLayout, StatusbarCollapseToggle, StatusbarHost;
|
|
export 'package:clide/src/shell/slot_host.dart' show SlotHost;
|
|
|
|
class ClideApp extends StatelessWidget {
|
|
const ClideApp({super.key, required this.services});
|
|
|
|
final KernelServices services;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ClideKernel(
|
|
services: services,
|
|
child: ClideTheme(
|
|
controller: services.theme,
|
|
child: _AppRoot(services: services),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _AppRoot extends StatelessWidget {
|
|
const _AppRoot({required this.services});
|
|
final KernelServices services;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return WidgetsApp(
|
|
debugShowCheckedModeBanner: false,
|
|
title: clideName,
|
|
color: const Color(0xFF000000),
|
|
pageRouteBuilder: <T>(RouteSettings settings, WidgetBuilder builder) => PageRouteBuilder<T>(settings: settings, pageBuilder: (ctx, _, _) => builder(ctx)),
|
|
home: RootShell(services: services),
|
|
);
|
|
}
|
|
}
|