mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-22 01:02:41 +00:00
* feat(app): rank, highlight, and timestamp Command Center results
Workspace and agent rows now show when they were last active, rank by
match quality and then recency, mark the query terms in every result
kind, and lead workspaces with their project icon.
Ties used to be broken by where the match landed in the string, so
"Deliver sidebar usage" beat "expose usage data" on sentence position
and recency almost never decided anything. Built-in rows now compare
only which fields matched and the matcher tier, then the most recent
row wins. The empty query follows the same rule, so it lists the most
recent workspaces and agents instead of alphabetical workspaces and
status-first agents.
Row and section heights live in list-metrics: a layout picks one row
inset and every height derives from it plus shared line boxes, which
the styles also read. The layout is chosen once at the top, so rows
never branch on it, and two-line rows are now vertically centered.
Desktop is denser (32/46); compact keeps 44pt touch rows (44/58).
findHighlightRanges takes the matcher's options so the marks match
what the list matched: the Command Center is not typo-tolerant, the
history list is.
* fix(app): keep the project icon out of Command Center row names
The fallback project icon draws the project's initial as text, which
became the first word of the row's accessible name ("C Command Center
..."), so screen readers announced it. The icon is decorative.
The scroll spec now reads the newest seeded workspace: the empty query
lists the most recent workspaces, so the first one seeded is no longer
among them.
55 lines
1.9 KiB
TypeScript
55 lines
1.9 KiB
TypeScript
import { test } from "../support/fixtures";
|
|
import { gotoAppShell } from "../support/helpers/app";
|
|
import {
|
|
expectCommandCenterToRemainAtTheTop,
|
|
expectPrimaryCommandCenterActions,
|
|
expectTightTwoLineResultSpacing,
|
|
expectVisibleKeyboardNavigationNotToScroll,
|
|
expectWorkspaceResultsToBeLimitedUntilSearch,
|
|
observeCommandCenterScroll,
|
|
openCommandCenterWithKeyboard,
|
|
} from "../support/helpers/command-center-scroll";
|
|
import { seedWorkspace } from "../support/helpers/seed-client";
|
|
|
|
test.use({
|
|
userAgent:
|
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 Chrome/145.0 Safari/537.36",
|
|
});
|
|
|
|
test("opening the command center keeps its first result fully visible", async ({ page }) => {
|
|
const seeded = await seedWorkspace({
|
|
repoPrefix: "command-center-scroll-",
|
|
title: "Command Center Scroll 00",
|
|
});
|
|
|
|
try {
|
|
for (let index = 1; index <= 8; index += 1) {
|
|
const created = await seeded.client.createWorkspace({
|
|
source: {
|
|
kind: "worktree",
|
|
projectId: seeded.projectId,
|
|
baseBranch: "main",
|
|
worktreeSlug: `command-center-scroll-${index}`,
|
|
},
|
|
title: `Command Center Scroll ${String(index).padStart(2, "0")}`,
|
|
});
|
|
if (!created.workspace) {
|
|
throw new Error(created.error ?? `Failed to seed workspace ${index}`);
|
|
}
|
|
}
|
|
|
|
await gotoAppShell(page);
|
|
await observeCommandCenterScroll(page);
|
|
const panel = await openCommandCenterWithKeyboard(page);
|
|
|
|
await expectCommandCenterToRemainAtTheTop(page);
|
|
await expectPrimaryCommandCenterActions(panel);
|
|
await expectVisibleKeyboardNavigationNotToScroll(page, panel);
|
|
// The empty query lists the most recent workspaces, so the last one seeded leads it.
|
|
await expectTightTwoLineResultSpacing(panel, "Command Center Scroll 08");
|
|
await expectWorkspaceResultsToBeLimitedUntilSearch(panel);
|
|
} finally {
|
|
await seeded.cleanup();
|
|
}
|
|
});
|