persist last-opened project and wire welcome open dialog

ProjectManager.open() now saves app.lastProject to user settings.
Boot calls openLast() instead of opening cwd — first launch shows
the welcome screen, subsequent launches restore the last project
directly into Claude. The welcome "Open project" button shows a
modal path-entry dialog that validates against git and activates
the Claude tab on success. Removed the dead "New Claude session"
button since secondary sessions are spawned via command palette.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-22 23:29:40 +02:00
co-authored by Claude Opus 4.6
parent f07a7b55a2
commit eedeaec05a
4 changed files with 134 additions and 13 deletions
+9
View File
@@ -33,11 +33,20 @@ class ProjectManager extends ChangeNotifier {
}
_current = Directory(root);
await _settings.setProjectDir(_current);
await _settings.set<String>('app.lastProject', root);
_events.emit(ProjectOpened(path: root));
notifyListeners();
return true;
}
Future<bool> openLast() async {
final last = _settings.get<String>('app.lastProject');
if (last == null || last.isEmpty) return false;
final dir = Directory(last);
if (!await dir.exists()) return false;
return open(last);
}
Future<void> close() async {
if (_current == null) return;
_current = null;