Dock and task manager are one module: titled window pills, pins, Super+1..9
CI / test (push) Failing after 30s

The panel had a task list and, beside it, a dock showing the same running
apps again. They are now one module, the dock, in the task list's place:

- Pinned apps, then running ones; an app with windows is a pill with its
  window's title (or name and window count) while there is room, an icon
  when the panel is crowded ("Show window titles" in Dock settings).
- Its right-click menu has the task list's window commands (Minimize /
  Restore, Maximize) for a single window, or the app's windows by title.
- It stretches like the task list did; new panels get it instead of
  tasks. A saved panel's "tasks" becomes the dock (one dock, where the
  task list was); pins are the dock's own setting, so they carry over.
- An empty dock shows a "+ Add apps" tile that opens the Applications
  menu, where right-clicking an app offers Open and Pin to dock (adding a
  dock to the panel if there is none).
- Super+1 .. Super+9 open the dock's first nine apps like a click
  (shortcut "dock-apps", rebindable in Settings > Shortcuts).
- "New window" / "Open" only for apps the catalog can start.

The tasks component, lib/panel's pill geometry and the taskbar-widget
world are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiPCFHRxaJQvwex6ry
This commit is contained in:
Claude committed 2026-11-26 00:08:05 +00:00
1 parent 42aa770452
commit 6253371cb3
28 files changed
+801 -1131

No files matched your search

-10
View File
@@ -6,16 +6,6 @@ pub fn layout(Int32, Int32, Int32, Int32, Int32, Array[SlotIn]) -> Result[PanelL
pub fn popup_position(Int32, Int32, Int32, Int32, Int32, Int32) -> (Int32, Int32)
pub fn task_pill_at(Int32, Int32, Int32) -> Int32
pub let task_pill_gap : Int32
pub let task_pill_max : Int32
pub let task_pill_min : Int32
pub fn task_pill_w(Int32, Int32) -> Int32
// Errors
// Types and methods
-43
View File
@@ -1,43 +0,0 @@
///| Where the task manager (components/tasks) puts its window pills. It lives here, not in the
/// module, because the shell needs the same geometry to know which window a right-click hit: the
/// shell draws that window's menu (Quit, Minimize, Maximize) itself, since modules only get left
/// clicks.
///| Widest a pill gets, the gap between pills, and the narrowest before titles stop being readable.
pub let task_pill_max : Int = 140
///|
pub let task_pill_gap : Int = 6
///|
pub let task_pill_min : Int = 56
///| Pill width for `n` windows in a task bar `w` wide.
pub fn task_pill_w(n : Int, w : Int) -> Int {
if n <= 0 {
return task_pill_max
}
let fit = (w - task_pill_gap * (n - 1)) / n
if fit > task_pill_max {
task_pill_max
} else if fit < task_pill_min {
task_pill_min
} else {
fit
}
}
///| The pill (an index into the windows in opening order) under a task-bar-local `x`, or -1, for
/// `n` windows in a bar `w` wide. Pills that would start past the bar's end aren't drawn.
pub fn task_pill_at(x : Int, n : Int, w : Int) -> Int {
let pw = task_pill_w(n, w)
if x < 0 || x >= w {
return -1
}
let i = x / (pw + task_pill_gap)
if i < n && x - i * (pw + task_pill_gap) < pw {
i
} else {
-1
}
}
-19
View File
@@ -1,19 +0,0 @@
///|
test "task pills: width shrinks to fit, clamped" {
inspect(@panel.task_pill_w(0, 300), content="140")
inspect(@panel.task_pill_w(2, 300), content="140")
inspect(@panel.task_pill_w(3, 300), content="96")
inspect(@panel.task_pill_w(20, 300), content="56")
}
///|
test "task pills: hit test skips the gaps and the space after the last pill" {
// 2 windows in 300px: pills at 0..139 and 146..285.
inspect(@panel.task_pill_at(0, 2, 300), content="0")
inspect(@panel.task_pill_at(139, 2, 300), content="0")
inspect(@panel.task_pill_at(142, 2, 300), content="-1")
inspect(@panel.task_pill_at(146, 2, 300), content="1")
inspect(@panel.task_pill_at(290, 2, 300), content="-1")
inspect(@panel.task_pill_at(-1, 2, 300), content="-1")
inspect(@panel.task_pill_at(10, 0, 300), content="-1")
}