feat: one project sheet for sessions and scheduled tasks

- the scheduled-task scope dropdown becomes the same project sheet the
  new-session composer opens: Chat row, project icons, paths, the current
  check mark, and one row per checkout
- a filesystem root ("/") no longer reads as a blank row: pathLeaf falls
  back to the path itself instead of an empty last segment
- the sheet opens at once and refreshes the project list behind it; an
  empty list shows "Loading projects…" until the answer arrives, so the
  project chip no longer waits before anything appears
- bump to 0.5.5
This commit is contained in:
blumia committed 2026-11-26 14:00:35 +08:00
1 parent 545778c6f3
commit a70e9290ef
9 files changed
+338 -127

No files matched your search

+3
View File
@@ -250,6 +250,9 @@ class ProjectInfo {
/// sends `C:\...` and a project has to read as its folder name, not the path.
String pathLeaf(String path) {
final trimmed = path.replaceAll(RegExp(r'[/\\]+$'), '');
// A filesystem root ("/", "C:\") has no last segment; its own path is the
// only name left, and an empty one would render a blank row and menu entry.
if (trimmed.isEmpty) return path.trim();
final index = trimmed.lastIndexOf(RegExp(r'[/\\]'));
return index >= 0 ? trimmed.substring(index + 1) : trimmed;
}