Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ad2a695
feat(frontend): warm-ink UI polish overhaul (round 1)
CubityFirst Nov 5, 2026
2b8e0bb
feat(frontend): UI polish round 2 - settings geometry, file manager p…
CubityFirst Nov 5, 2026
e66a1c0
fix(frontend): mute revealed heading markers; fit editor toolbar
CubityFirst Nov 5, 2026
0be0e68
feat(frontend): UI polish rounds 3-5 - neutral palette, doc toolbar h…
CubityFirst Nov 6, 2026
9e2a950
feat(frontend): UI polish round 6 - editor chrome in top bar, split c…
CubityFirst Nov 6, 2026
46cd1a7
feat(frontend): UI polish round 7 - page actions in top bar, save fee…
CubityFirst Nov 6, 2026
6e26c50
feat(frontend): UI polish round 8 - sidebar page tree, file actions i…
CubityFirst Nov 6, 2026
24fa66c
chore(frontend): refresh landing product shots
CubityFirst Nov 6, 2026
64b8589
fix(frontend): dashboard search ranks title matches, shows excerpts, …
CubityFirst Nov 6, 2026
f65f8d9
fix(frontend): align site card description with title; read time on p…
CubityFirst Nov 6, 2026
59e3bb1
feat(frontend): UI polish round 10 - unified top-bar actions, badge v…
CubityFirst Nov 6, 2026
df74593
fix(frontend): readable search excerpts; sidebar marks the open folder
CubityFirst Nov 6, 2026
608f7de
feat(frontend): UI polish round 12 - doc menu actions, neutral highli…
CubityFirst Nov 6, 2026
5dede87
fix(frontend): 44px mobile touch targets for doc actions, drawer clos…
CubityFirst Nov 6, 2026
834a244
fix(frontend): side-panel markdown reference, settings jump lands tra…
CubityFirst Nov 6, 2026
e3acf9e
feat(frontend): UI polish round 14 - shared page container, file view…
CubityFirst Nov 6, 2026
a2bd94d
fix(frontend): dock markdown reference beside the editor; recycle-bin…
CubityFirst Nov 6, 2026
823cb3a
fix(frontend): 44px dice chip on phones with wrapping formula
CubityFirst Nov 6, 2026
11d1485
fix(frontend): readable search snippet separators, aligned markdown r…
CubityFirst Nov 6, 2026
d697438
fix(frontend): centred wide container, landing/legal/404 alignment, m…
CubityFirst Nov 6, 2026
337f27a
fix(frontend): centre 404 numeral; compact mobile profile-photo block
CubityFirst Nov 6, 2026
28c8f78
fix(frontend): file manager in shared container, pin instead of favou…
CubityFirst Nov 6, 2026
4589398
fix(frontend): site cards fit every feature hint - counts move under …
CubityFirst Nov 6, 2026
86d22a8
fix(frontend): site cards hold up with every feature on
CubityFirst Nov 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions e2e/tests/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test("registers a new account", async () => {

test("shows the dashboard with no projects", async () => {
await page.goto("/dashboard");
await expect(page.getByText("Your Sites")).toBeVisible();
await expect(page.getByText("Your sites")).toBeVisible();
await expect(page.getByText("New site")).toBeVisible();
});

Expand Down Expand Up @@ -189,28 +189,33 @@ test("preview shows the saved title and content", async () => {
// ── Navigate back & verify file list ────────────────────────────────────────

test("the document appears in the project file list", async () => {
await page.getByRole("link", { name: "File Manager" }).click();
await page.getByRole("link", { name: "File manager" }).click();
await expect(page).toHaveURL(/\/projects\/[a-z0-9-]+$/, { timeout: 5000 });
await expect(page.getByText("My E2E Document")).toBeVisible({ timeout: 5000 });
// Scoped to <main>: the sidebar page tree also lists the doc.
await expect(page.getByRole("main").getByText("My E2E Document").first()).toBeVisible({ timeout: 5000 });
});

// ── FileManager: new folder ──────────────────────────────────────────────────

test("creates a folder", async () => {
await page.getByRole("button", { name: "New folder" }).click();
const folderInput = page.getByPlaceholder("Folder name");
// Secondary create actions live behind the "New document" split button's chevron.
await page.getByRole("button", { name: "More create options" }).click();
await page.getByRole("menuitem", { name: "New folder" }).click();
const folderInput = page.getByLabel("Folder name", { exact: true });
await expect(folderInput).toBeVisible({ timeout: 5000 });
await folderInput.fill("E2E Folder");
await page.getByRole("button", { name: "Create" }).click();
// .first(): the folder renders twice (desktop table + CSS-hidden mobile card
// list), and strict mode counts hidden matches too. Desktop row comes first.
await expect(page.getByText("E2E Folder").first()).toBeVisible({ timeout: 5000 });
await expect(page.getByRole("main").getByText("E2E Folder").first()).toBeVisible({ timeout: 5000 });
});

// ── FileManager: document inside folder ─────────────────────────────────────

test("navigates into the folder and creates a document inside it", async () => {
await page.getByText("E2E Folder").first().click();
// Scoped to <main>: the sidebar page tree has a same-named folder toggle
// (it comes first in DOM order and only expands the tree).
await page.getByRole("main").getByText("E2E Folder").first().click();

await page.getByRole("button", { name: "New document" }).click();
await expect(page).toHaveURL(/\/projects\/.+\/docs\/.+/, { timeout: 10000 });
Expand All @@ -229,7 +234,7 @@ test("drags a document into a folder", async () => {
// Navigate back to the project root file manager. Assert on the draggable
// desktop row - bare getByText also matches the sidebar "Recently accessed"
// link and the mobile card list, which strict mode rejects.
await page.getByRole("link", { name: "File Manager" }).click();
await page.getByRole("link", { name: "File manager" }).click();
await expect(page).toHaveURL(/\/projects\/[a-z0-9-]+$/, { timeout: 5000 });
await expect(page.locator('[draggable="true"]', { hasText: "My E2E Document" })).toBeVisible({ timeout: 10000 });

Expand All @@ -243,8 +248,10 @@ test("drags a document into a folder", async () => {
).not.toBeVisible({ timeout: 5000 });

// Enter the folder and confirm the doc is now inside.
await page.getByText("E2E Folder").first().click();
await expect(page.getByText("My E2E Document").first()).toBeVisible({ timeout: 5000 });
// Scoped to <main>: the sidebar page tree has a same-named folder toggle
// (it comes first in DOM order and only expands the tree).
await page.getByRole("main").getByText("E2E Folder").first().click();
await expect(page.getByRole("main").getByText("My E2E Document").first()).toBeVisible({ timeout: 5000 });
});

// ── FileManager: drag doc back to root via breadcrumb ────────────────────────
Expand All @@ -265,7 +272,7 @@ test("drags a document back to root via the breadcrumb", async () => {
// Navigate to the project root and confirm the doc is back there. Assert on
// the draggable desktop row - bare getByText also matches the sidebar
// "Recently accessed" link, which strict mode rejects once the table renders.
await page.getByRole("link", { name: "File Manager" }).click();
await page.getByRole("link", { name: "File manager" }).click();
await expect(page.locator('[draggable="true"]', { hasText: "My E2E Document" })).toBeVisible({ timeout: 10000 });
});

Expand All @@ -292,8 +299,8 @@ test("renames a folder via the context menu", async () => {

// Generous timeout: the rename PUT can be slow through the local wrangler
// chain when other suites are hammering it in parallel.
await expect(page.getByText("E2E Renamed Folder").first()).toBeVisible({ timeout: 15000 });
await expect(page.getByText("E2E Folder", { exact: true })).not.toBeVisible();
await expect(page.getByRole("main").getByText("E2E Renamed Folder").first()).toBeVisible({ timeout: 15000 });
await expect(page.getByRole("main").getByText("E2E Folder", { exact: true })).not.toBeVisible();
});

// ── FileManager: right-click context menu - delete ───────────────────────────
Expand All @@ -303,10 +310,10 @@ test("deletes a document via the context menu", async () => {
// "Recently accessed" link and the CSS-hidden mobile card list.
const docRow = page.locator('[draggable="true"]', { hasText: "My E2E Document" });
await docRow.click({ button: "right" });
await page.getByRole("menuitem", { name: "Delete" }).click();
await page.getByRole("menuitem", { name: "Move to recycle bin" }).click();

await expect(page.getByRole("alertdialog")).toBeVisible({ timeout: 3000 });
await page.getByRole("alertdialog").getByRole("button", { name: "Delete" }).click();
await page.getByRole("alertdialog").getByRole("button", { name: "Move to recycle bin" }).click();

await expect(docRow).not.toBeVisible({ timeout: 5000 });
});
Expand All @@ -317,12 +324,12 @@ test("can favourite the project from the dashboard", async () => {
await page.goto("/dashboard");
const projectCard = page.locator(".group", { hasText: PROJECT_NAME });
await expect(projectCard).toBeVisible({ timeout: 5000 });
await projectCard.getByRole("button", { name: "Add to favourites", exact: true }).click();
await expect(projectCard.getByRole("button", { name: "Remove from favourites", exact: true })).toBeVisible({ timeout: 5000 });
await projectCard.getByRole("button", { name: "Pin to top", exact: true }).click();
await expect(projectCard.getByRole("button", { name: "Unpin", exact: true })).toBeVisible({ timeout: 5000 });
// Persisted server-side, not just an optimistic toggle.
await page.reload();
await expect(
page.locator(".group", { hasText: PROJECT_NAME }).getByRole("button", { name: "Remove from favourites", exact: true }),
page.locator(".group", { hasText: PROJECT_NAME }).getByRole("button", { name: "Unpin", exact: true }),
).toBeVisible({ timeout: 5000 });
});

Expand Down
18 changes: 10 additions & 8 deletions e2e/tests/audio-permission-lock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* pnpm dev
*
* Scenario (single owner, two sites):
* - Create Site A, upload an audio file to Site A, grab its "Copy markdown".
* - Create Site B, upload an audio file to Site B, grab its "Copy markdown".
* - Create Site A, upload an audio file to Site A, grab its "Copy embed".
* - Create Site B, upload an audio file to Site B, grab its "Copy embed".
* - Create a document in Site B and paste BOTH internal links plus a third
* "External URL" audio (https://i.cubityfir.st/explorer_9LHgOrjobE.wav).
* - View the doc in reading mode internal to Site B.
Expand All @@ -31,14 +31,14 @@
*
* Notes:
* - Audio detection (`looksLikeAudio`) keys off the URL extension, falling
* back to the alt text when the URL has none. A "Copy markdown" link is
* back to the alt text when the URL has none. A "Copy embed" link is
* `![<filename>](/api/files/<id>/content)` (no extension), so the uploaded
* files MUST be named `*.wav` for the alt to trigger the audio renderer.
* - The external audio is intercepted and fulfilled with a tiny valid WAV so
* the test is hermetic / offline-deterministic - we are exercising the
* renderer branch that treats non-/api/files URLs as a plain <audio> not
* subject to the lock, not third-party network availability.
* - The doc body is built from the exact "Copy markdown" string format (see
* - The doc body is built from the exact "Copy embed" string format (see
* FilePage.tsx; the button is shown for `audio/*` too). On Chromium we
* additionally click the real button and assert the clipboard matches;
* Firefox can't read the clipboard under Playwright, so there we only
Expand Down Expand Up @@ -125,7 +125,7 @@ async function createSite(p: Page, name: string): Promise<string> {
}

// Upload the tiny WAV straight to /api/files (mime audio/wav so the FilePage
// "Copy markdown" button appears and the file is treated as audio).
// "Copy embed" button appears and the file is treated as audio).
async function uploadAudio(p: Page, projectId: string, name: string): Promise<string> {
const id = await p.evaluate(async ({ projectId, name, b64 }) => {
const token = localStorage.getItem("token");
Expand Down Expand Up @@ -266,6 +266,8 @@ test("registers, creates Site A + Site B, uploads audio to each, and a doc in Si
// save the empty draft to mint an id.
await page.getByRole("button", { name: "New document" }).click();
await expect(page).toHaveURL(/\/docs\/new$/, { timeout: 10000 });
// Save stays disabled on an empty, untitled draft - give it a title.
await page.getByPlaceholder("Document title").fill("Audio Permission Lock Doc");
await page.getByRole("button", { name: "Save" }).click();
await expect(page).toHaveURL(/\/docs\/(?!new$)[a-z0-9-]+$/, { timeout: 10000 });
docId = page.url().match(/\/docs\/([a-z0-9-]+)/)![1];
Expand All @@ -277,13 +279,13 @@ test("registers, creates Site A + Site B, uploads audio to each, and a doc in Si
expect(docId).toBeTruthy();
});

test("the 'Copy markdown' button copies the canonical /api/files link for audio", async ({ browserName }) => {
test("the 'Copy embed' button copies the canonical /api/files link for audio", async ({ browserName }) => {
for (const [projectId, fileId, fileName] of [
[projectAId, fileAId, FILE_A_NAME],
[projectBId, fileBId, FILE_B_NAME],
] as const) {
await page.goto(`/projects/${projectId}/files/${fileId}`);
const copyBtn = page.getByRole("button", { name: /copy markdown/i });
const copyBtn = page.getByRole("button", { name: /copy embed/i });
await expect(copyBtn).toBeVisible({ timeout: 10000 });
await copyBtn.click();

Expand All @@ -302,7 +304,7 @@ test("the 'Copy markdown' button copies the canonical /api/files link for audio"

test("internal reading view locks the Site A audio; Site B + external render", async () => {
// "Paste both links" + the external URL into the Site B document. This is
// exactly the markdown the FilePage "Copy markdown" button produces.
// exactly the markdown the FilePage "Copy embed" button produces.
const content = [
"# Audio Permission Lock",
"",
Expand Down
19 changes: 10 additions & 9 deletions e2e/tests/avatar-upload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,16 @@ test("a light request falls back to the dark variant when no light exists", asyn
test("uploading with the toggle on Light stores an independent light variant", async () => {
await page.goto("/settings");

// The sun/moon toggle sits directly below the avatar. It starts on "Dark"
// (Moon); clicking it switches the slot that Upload/Remove targets to Light.
// Locate by title, not accessible name - the theme picker on the same page
// also has buttons named "Dark"/"Light".
const toggle = page.getByTitle("Switch which avatar variant you view and edit (dark vs light backgrounds)");
await expect(toggle).toBeVisible({ timeout: 5000 });
await expect(toggle).toHaveText(/Dark/);
await toggle.click();
await expect(toggle).toHaveText(/Light/);
// The "Avatar preview" segmented control sits directly below the
// avatar. It starts on Dark; picking Light switches the slot that
// Upload/Remove targets. Scope to the radiogroup - the theme picker on the
// same page also has buttons named "Dark"/"Light".
const variantGroup = page.getByRole("radiogroup", { name: "Avatar preview" });
await expect(variantGroup).toBeVisible({ timeout: 5000 });
await expect(variantGroup.getByRole("radio", { name: "Dark" })).toHaveAttribute("aria-checked", "true");
const lightOption = variantGroup.getByRole("radio", { name: "Light" });
await lightOption.click();
await expect(lightOption).toHaveAttribute("aria-checked", "true");

const fileInput = page.locator('input[type="file"][accept*="image/gif"]');
await fileInput.setInputFiles({
Expand Down
2 changes: 2 additions & 0 deletions e2e/tests/big-doc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ test("creates a project and uploads a ~200 KB markdown doc", async () => {
// Docs are only created on first save - save the empty draft to mint an id.
await page.getByRole("button", { name: "New document" }).click();
await expect(page).toHaveURL(/\/docs\/new$/, { timeout: 10000 });
// Save stays disabled on an empty, untitled draft - give it a title.
await page.getByPlaceholder("Document title").fill("Big Document");
await page.getByRole("button", { name: "Save" }).click();
await expect(page).toHaveURL(/\/docs\/(?!new$)[a-z0-9-]+$/, { timeout: 10000 });
docId = page.url().match(/\/docs\/([a-z0-9-]+)/)![1];
Expand Down
18 changes: 10 additions & 8 deletions e2e/tests/demo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ async function scrollUntilVisible(page: Page, locator: ReturnType<Page["locator"
test.describe("demo sandbox", () => {
test("landing page 'See a demo' links to /demo", async ({ page }) => {
await page.goto("/");
const demoLink = page.locator('a:has-text("See a demo")');
// The hero and the closing CTA band both link to the demo.
const demoLink = page.locator('a:has-text("See a demo")').first();
await expect(demoLink).toHaveAttribute("href", "/demo");
});

Expand Down Expand Up @@ -135,22 +136,22 @@ test.describe("demo sandbox", () => {
await expect(guidesRow).toBeVisible();

await page.getByLabel("Actions for folder Guides").click();
await page.getByRole("menuitem", { name: "Delete" }).click();
await page.getByRole("menuitem", { name: "Move to recycle bin" }).click();
await expect(page.getByText(/will be moved to the recycle bin/)).toBeVisible();
await page.getByRole("button", { name: "Delete", exact: true }).click();
await page.getByRole("button", { name: "Move to recycle bin", exact: true }).click();
await expect(page.getByText('Moved "Guides" to the recycle bin.')).toBeVisible();
await expect(guidesRow).toHaveCount(0);

// Client-side navigation only from here: a full reload reseeds the demo store.
// The bin is a section of Site Settings.
await page.getByTitle("Site Settings").click();
await page.getByTitle("Site settings").click();
await expect(page.getByRole("heading", { name: "Recycle bin" })).toBeVisible();
await expect(page.getByText("Guides", { exact: true })).toBeVisible();
await expect(page.getByRole("main").getByText("Guides", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Restore Guides" }).click();
await expect(page.getByText('Restored "Guides"')).toBeVisible();
await expect(page.getByText("The recycle bin is empty")).toBeVisible();

await page.getByRole("link", { name: "File Manager" }).click();
await page.getByRole("link", { name: "File manager" }).click();
await expect(guidesRow).toBeVisible();
});

Expand All @@ -172,7 +173,8 @@ test.describe("demo sandbox", () => {
await page.getByRole("link", { name: /\/@demo-person$/ }).click();
await page.waitForURL("**/@demo-person");
await expect(page.getByRole("heading", { level: 1, name: "Demo User" })).toBeVisible();
await expect(page.getByRole("dialog").getByText("@demo-person", { exact: true })).toBeVisible();
// Opened directly (no background page), the profile renders as a full page.
await expect(page.getByText("@demo-person", { exact: true })).toBeVisible();

await page.goBack();
await page.getByRole("switch", { name: "Profile link" }).click();
Expand All @@ -199,6 +201,6 @@ test.describe("demo sandbox", () => {
await enterDemo(page);
await page.click('button:has-text("Exit demo")');
await page.waitForURL((url) => url.pathname === "/");
await expect(page.getByText("See a demo")).toBeVisible();
await expect(page.getByText("See a demo").first()).toBeVisible();
});
});
6 changes: 4 additions & 2 deletions e2e/tests/excalidraw.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ test("registers and creates a site", async () => {

test("'New drawing' creates a .excalidraw file and mounts the editor", async () => {
await page.goto(`/projects/${projectId}`);
await page.getByRole("button", { name: "New drawing" }).click();
// Secondary create actions live behind the "New document" split button's chevron.
await page.getByRole("button", { name: "More create options" }).click();
await page.getByRole("menuitem", { name: "New drawing" }).click();

// Navigates to the file page for the new drawing.
await expect(page).toHaveURL(/\/projects\/.+\/files\/.+/, { timeout: 15000 });
Expand Down Expand Up @@ -188,5 +190,5 @@ test("drawing a shape and saving persists it", async () => {

test("the drawing appears in the file listing", async () => {
await page.goto(`/projects/${projectId}`);
await expect(page.getByText("Untitled.excalidraw").first()).toBeVisible({ timeout: 10000 });
await expect(page.getByRole("main").getByText("Untitled.excalidraw").first()).toBeVisible({ timeout: 10000 });
});
Loading
Loading