Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .claude/skills/podbay-ui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The app is a single-page app served as static assets. It shows strangers' mail i
- a date is `DatePicker`;
- an action is `Button`, and a field with its label and help is `Field` with `Label`.

Read the component's entry in Kumo's own documentation, shipped with the pinned version (`node_modules/@cloudflare/kumo/ai/component-registry.md`), before using it. A control's size is its `size` prop, never a class: the controls of one form share one size, and a height, a size, a corner or a type size written by hand on a Kumo control is refused. Where Kumo's component cannot do the job, one wrapper for it lives in `app/components/controls/` and every screen uses it. A native control that must stay (a whole line that opens a message, say) is one line of `ON_PURPOSE` in `scripts/checks/controls.ts`, with its reason. The controls written by hand before the check came in are its `TO_MOVE` debt, which only goes down (#82, #83).
Read the component's entry in Kumo's own documentation, shipped with the pinned version (`node_modules/@cloudflare/kumo/ai/component-registry.md`), before using it. A control's size is its `size` prop, never a class: the controls of one form share one size, and a height, a size, a corner or a type size written by hand on a Kumo control is refused. Where Kumo's component cannot do the job, one wrapper for it lives in `app/components/controls/` and every screen uses it. A native control that must stay (a whole line that opens a message, say) is one line of `ON_PURPOSE` in `scripts/checks/controls.ts`, with its reason. A Kumo control that keeps a fully round shape a screen had before Kumo (`rounded-full` alone, which Kumo gives only to a circle for an icon) is one line of `ROUND_ON_PURPOSE` there, with its reason. A move to Kumo keeps what the screen looks like; a change of look is said in the pull request with pictures of before and after. The controls written by hand before the check came in are its `TO_MOVE` debt, which only goes down (#82, #83).

Every control has a name: Kumo's controls take `label`; an icon button gets `aria-label`. Errors are `role="alert"`. Move focus by a ref to the form, not by element id (the field library sets ids after the first paint).
7. **Attachments are downloads.** Link to a plain one; a risky one goes through the warning in `EmailAttachmentList`. Only plain image kinds are previewed or embedded (`isShowableImage`).
Expand Down
30 changes: 16 additions & 14 deletions app/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,26 @@ export default function Header() {
className="h-12 w-full rounded-full border border-transparent bg-kumo-fill pl-12 pr-20 text-sm text-kumo-default placeholder:text-kumo-subtle focus:border-kumo-line focus:bg-kumo-base focus:outline-none focus:ring-1 focus:ring-kumo-ring [&::-webkit-search-cancel-button]:hidden"
/>
{searchQuery && (
<button
type="button"
onClick={clearSearch}
className="absolute right-11 rounded-full p-1 bg-transparent border-0 text-kumo-subtle hover:bg-kumo-tint hover:text-kumo-default cursor-pointer"
<Button
variant="ghost"
shape="circle"
size="sm"
className="absolute right-11 text-kumo-subtle"
icon={<XIcon size={16} />}
aria-label={t("Clear search")}
>
<XIcon size={16} />
</button>
onClick={clearSearch}
/>
)}
<button
type="button"
onClick={() => setOptionsOpen(true)}
className="absolute right-3 rounded-full p-1.5 bg-transparent border-0 text-kumo-subtle hover:bg-kumo-tint hover:text-kumo-default cursor-pointer"
<Button
variant="ghost"
shape="circle"
size="sm"
className="absolute right-3 text-kumo-subtle"
icon={<SlidersIcon size={16} />}
aria-label={t("Search options")}
title={t("Search options")}
>
<SlidersIcon size={16} />
</button>
onClick={() => setOptionsOpen(true)}
/>
<SearchOptions
open={optionsOpen}
onOpenChange={setOptionsOpen}
Expand Down
43 changes: 21 additions & 22 deletions app/components/MessageList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2026 Cloudhal and the Podbay contributors
// Licensed under the Apache 2.0 license found in the LICENSE file.

import { Badge, Tooltip } from "@cloudflare/kumo";
import { Badge, Button, Checkbox, Tooltip } from "@cloudflare/kumo";
import {
ArchiveIcon,
ArrowBendUpLeftIcon,
Expand Down Expand Up @@ -328,6 +328,14 @@ export default function MessageList({
event.dataTransfer.effectAllowed = "move";
}}
onDragEnd={() => useUIStore.setState({ dragged: [] })}
// Whether Shift is held for the box this click or key ticks: Kumo's box takes no click
// handler of its own, so the line reads it on the way down.
onClickCapture={(event) => {
withShift.current = event.shiftKey;
}}
onKeyDownCapture={(event) => {
withShift.current = event.shiftKey;
}}
onContextMenu={(event) => {
event.preventDefault();
setMenu({ email, at: { x: event.clientX, y: event.clientY } });
Expand All @@ -336,35 +344,26 @@ export default function MessageList({
index === cursor ? "border-l-kumo-brand" : "border-l-transparent"
} ${tone}`}
>
<input
type="checkbox"
<Checkbox
aria-label={t('Select the conversation "{subject}"', {
subject: email.subject || t("(no subject)"),
})}
className="mx-1 h-4 w-4 shrink-0 cursor-pointer"
className="mx-1 shrink-0"
checked={isSelected}
onClick={(event) => {
withShift.current = event.shiftKey;
}}
onChange={() => toggle(email.id)}
onCheckedChange={() => toggle(email.id)}
/>
<button
type="button"
<Button
variant="ghost"
shape="square"
size="sm"
aria-label={email.starred ? t("Unstar") : t("Star")}
aria-pressed={email.starred}
className="shrink-0 rounded bg-transparent border-0 p-0.5 cursor-pointer"
className={`shrink-0 ${
email.starred ? "text-kumo-warning" : "text-kumo-subtle hover:text-kumo-warning"
}`}
icon={<StarIcon size={16} weight={email.starred ? "fill" : "regular"} />}
onClick={() => actions.star(email)}
>
<StarIcon
size={16}
weight={email.starred ? "fill" : "regular"}
className={
email.starred
? "text-kumo-warning"
: "text-kumo-subtle hover:text-kumo-warning"
}
/>
</button>
/>

{/* The conversation itself: one button, so the row has one name and one action */}
<button
Expand Down
17 changes: 6 additions & 11 deletions app/components/MessageListToolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2026 Cloudhal and the Podbay contributors
// Licensed under the Apache 2.0 license found in the LICENSE file.

import { Button, DropdownMenu } from "@cloudflare/kumo";
import { Button, Checkbox, DropdownMenu } from "@cloudflare/kumo";
import {
ArchiveIcon,
ArrowsClockwiseIcon,
Expand All @@ -15,7 +15,6 @@ import {
TrayIcon,
WarningOctagonIcon,
} from "@phosphor-icons/react";
import { useEffect, useRef } from "react";
import { Folders } from "shared/folders";
import type { ConversationActions } from "~/hooks/useConversationActions";
import { t } from "~/i18n";
Expand Down Expand Up @@ -63,11 +62,7 @@ export default function MessageListToolbar({
isRefreshing,
onRefresh,
}: MessageListToolbarProps) {
const selectAll = useRef<HTMLInputElement>(null);
const allSelected = emails.length > 0 && chosen.length === emails.length;
useEffect(() => {
if (selectAll.current) selectAll.current.indeterminate = chosen.length > 0 && !allSelected;
}, [chosen.length, allSelected]);

const pick = (keep: (email: Email) => boolean) => onSelect(emails.filter(keep).map((e) => e.id));
const anyUnread = chosen.some(isUnread);
Expand All @@ -76,14 +71,14 @@ export default function MessageListToolbar({

return (
<div className="flex h-12 shrink-0 items-center gap-1 border-b border-kumo-line px-3">
<input
ref={selectAll}
type="checkbox"
<Checkbox
aria-label={t("Select all conversations on this page")}
className="ml-1.5 h-4 w-4 cursor-pointer"
// Kumo's box takes clicks 12 px around it; this keeps them off the menu's button beside it.
className="ml-1.5 mr-2"
checked={allSelected}
indeterminate={chosen.length > 0 && !allSelected}
disabled={emails.length === 0}
onChange={() => pick(() => !allSelected)}
onCheckedChange={() => pick(() => !allSelected)}
/>
<DropdownMenu>
<DropdownMenu.Trigger
Expand Down
9 changes: 6 additions & 3 deletions app/components/SignInSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,20 @@ export default function SignInSteps({
>
{t("Continue")}
</Button>
<button
<Button
type="button"
className="text-sm underline cursor-pointer bg-transparent border-0 p-0 text-kumo-subtle"
variant="ghost"
size="xs"
// Grey and underlined, the text action it was; set back by its padding to the form's edge.
className="-ml-1.5 text-kumo-subtle underline"
onClick={() => {
setRecovery(!recovery);
setCode("");
setError(null);
}}
>
{recovery ? t("Use a code from the app instead") : t("Use a recovery code instead")}
</button>
</Button>
</form>
);
}
Expand Down
15 changes: 10 additions & 5 deletions app/components/email-panel/MessageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ export default function MessageHeader({
)}

<div className="min-w-0 flex-1">
<div className="flex items-center gap-2">
{/* The line wraps: where Unsubscribe would leave the name no room, it moves under the name. */}
<div className="flex flex-wrap items-center gap-x-2">
{actions && !isSelf && !isDraft ? (
// The sender's name opens what can be done with the sender, as a card would.
<DropdownMenu>
Expand Down Expand Up @@ -189,13 +190,17 @@ export default function MessageHeader({
)}
{isDraft && <Badge variant="outline">{t("Draft")}</Badge>}
{actions?.onUnsubscribe && (
<button
type="button"
// Kumo's ghost button at its extra small size, underlined as the text action it is; its
// margins give back the 4 px it is taller than the name's line, so the head keeps its size,
// and the 6 px of its padding, so its word stands 8 px after the name, or under the name.
<Button
variant="ghost"
size="xs"
onClick={actions.onUnsubscribe}
className="shrink-0 cursor-pointer border-0 bg-transparent p-0 text-xs text-kumo-subtle underline hover:text-kumo-default print:hidden"
className="-my-0.5 -ml-1.5 shrink-0 text-kumo-subtle underline print:hidden"
>
{t("Unsubscribe")}
</button>
</Button>
)}
</div>
<button
Expand Down
20 changes: 9 additions & 11 deletions app/routes/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,24 +177,22 @@ export default function HomeRoute() {
)}
</div>
{me && (
<p className="text-sm text-kumo-subtle mt-1">
{t("Signed in as {email}.", { email: me.user.email })}{" "}
<button
type="button"
className="underline cursor-pointer bg-transparent border-0 p-0 text-kumo-subtle"
<div className="mt-1 flex flex-wrap items-center gap-x-3 gap-y-2 text-sm text-kumo-subtle">
<span>{t("Signed in as {email}.", { email: me.user.email })}</span>
<RouterLink to="/account/security" className="underline">
{t("Sign-in and security")}
</RouterLink>
<Button
size="sm"
onClick={async () => {
await signOut();
queryClient.clear();
await navigate({ to: "/sign-in" });
}}
>
{t("Sign out")}
</button>
{" · "}
<RouterLink to="/account/security" className="underline">
{t("Sign-in and security")}
</RouterLink>
</p>
</Button>
</div>
)}
{domains.length > 0 && (
<p className="text-sm text-kumo-subtle mt-1">{domains.join(", ")}</p>
Expand Down
19 changes: 11 additions & 8 deletions app/routes/search-results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// https://opensource.org/licenses/Apache-2.0
// Modified by the Podbay contributors.

import { Button } from "@cloudflare/kumo";
import { MagnifyingGlassIcon, StarIcon } from "@phosphor-icons/react";
import { useNavigate, useParams, useSearch } from "@tanstack/react-router";
import { useEffect, useState } from "react";
Expand Down Expand Up @@ -92,9 +93,16 @@ export default function SearchResultsRoute() {
{QUICK_FILTERS.map(([operator, label]) => {
const on = hasOperator(urlQuery, operator);
return (
<button
<Button
key={operator}
type="button"
size="sm"
variant="outline"
// As before Kumo: a chosen filter has a tint and a line of the brand colour.
className={
on
? "rounded-full bg-kumo-brand/10 font-semibold text-kumo-default ring-kumo-brand"
: "rounded-full text-kumo-strong"
}
aria-pressed={on}
onClick={() => {
if (!mailboxId) return;
Expand All @@ -104,14 +112,9 @@ export default function SearchResultsRoute() {
search: { q: toggleOperator(urlQuery, operator) },
});
}}
className={`cursor-pointer rounded-full border px-3 py-1 text-xs ${
on
? "border-kumo-brand bg-kumo-brand/10 font-semibold text-kumo-default"
: "border-kumo-line bg-transparent text-kumo-strong hover:bg-kumo-tint"
}`}
>
{t(label)}
</button>
</Button>
);
})}
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
| Markdown links and anchors | D14 | `pnpm static docs` |
| The guidance is consistent: `AGENTS.md` is one page and names every skill and subagent; skills are named as their folders; a rule's paths still match files; a subagent names only skills that exist and cannot edit; the settings keep local secrets unread and ask before a push or a deploy | D15 | `pnpm static guidance`, `test/unit/guidance.test.ts` |
| No lint warning: every rule has one level for every file, no file is exempt, and `pnpm lint` fails on a warning (`--error-on-warnings`), so a clean run prints none. A rule is kept off at a place only by a `biome-ignore` that says why (two keyed lists that are never reordered). File size only goes down | D1, D4 | `pnpm lint`, `pnpm static ratchets` (lint warnings at 0) |
| The app's controls are Kumo's (`pnpm static controls`): no `<select>`, `<textarea>`, `<input>` or `<button>` written by hand in `app/`, unless kept on purpose with its reason; no height, size, padding, corner, type size or line height written by hand on a Kumo control, one of its dotted parts or a wrapper of `app/components/controls/`, with or without the important mark, and no `style` attribute on one; no plain element with the role of a control. A tag is read whole, across lines. The controls written by hand before the check came in (62 places in 30 files, six pill buttons, and one list with the role `listbox`) are a debt that only goes down, paid by #82 and #83. Not proven by the check: a control made with `createElement` or a tag in a variable, a Kumo control imported under another name, and a class from a variable or after a `${…}`; those are held by review. A changed screen is looked at in a real browser at both widths and in both themes, with the pictures in the pull request: the skill and the template ask it, and no check holds it | D9 | `scripts/checks/controls.ts`; `test/unit/controls.test.ts`; the `podbay-ui` skill (rule 6, "Before you finish") and `.github/pull_request_template.md` |
| The app's controls are Kumo's (`pnpm static controls`): no `<select>`, `<textarea>`, `<input>` or `<button>` written by hand in `app/`, unless kept on purpose with its reason; no height, size, padding, corner, type size or line height written by hand on a Kumo control, one of its dotted parts or a wrapper of `app/components/controls/`, with or without the important mark, and no `style` attribute on one, except a Kumo control made fully round (`rounded-full` and no other such class) where `ROUND_ON_PURPOSE` lists it with its reason and its count; no plain element with the role of a control. A tag is read whole, across lines. The controls written by hand before the check came in (62 places in 30 files, six pill buttons, and one list with the role `listbox`) are a debt that only goes down, paid by #82 and #83. Not proven by the check: a control made with `createElement` or a tag in a variable, a Kumo control imported under another name, and a class from a variable or after a `${…}`; those are held by review. A changed screen is looked at in a real browser at both widths and in both themes, with the pictures in the pull request: the skill and the template ask it, and no check holds it | D9 | `scripts/checks/controls.ts`; `test/unit/controls.test.ts`; the `podbay-ui` skill (rule 6, "Before you finish") and `.github/pull_request_template.md` |
| `biome.json` names the schema of the Biome the catalog pins: an update of the tool cannot leave its configuration behind | V1 | `pnpm static schemas`; `test/unit/schemas.test.ts` |
| Lint errors, formatting | D1 | `pnpm lint` |
| Types | D1 | `pnpm typecheck` |
Expand Down
Loading