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
16 changes: 11 additions & 5 deletions .agents/skills/kindle-drop-ui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ description: kindle-drop's product design and UI writing guide, covering the agr

# kindle-drop UI

Kindle Drop sends books from the user's phone to their Kindle. The interface should feel like a well-made system app: calm, quiet, and professional. Every word earns its place.
Dropcap sends books from the user's phone to their Kindle. The interface should feel like a well-made system app: calm, quiet, and professional. Every word earns its place.

The design below was researched and agreed with the user on 2026-10-28. Build what it describes. Treat any change to a flow or to a term in the vocabulary as a product decision, and ask the user first.

## Brand

- The app is **Dropcap**: one word, capital D only. "Kindle" names the device and nothing else, because the app must not borrow Amazon's mark. The package id and `kindledrop://` scheme keep the old name, since the installed app depends on them.
- The icon is a first-quarter moon over water, and the moon is the D. Its reflection breaks into lines of text. Production shows the full night-sky art. Dev, preview, and the themed icon use the flat mark (`assets/icon-mark.svg`).
- The layers live in `assets/icon-*.svg` on a shared 108 dp canvas. After editing one, run `pnpm vp run --filter @kindle-drop/mobile icons`. The icon is part of the native fingerprint, so a change needs a native build.

## Writing rules

1. **Fewer words.** Cut every word the meaning survives without. Buttons are one to three words.
Expand Down Expand Up @@ -80,15 +86,15 @@ At the bottom is "Disconnect Kindle" in the danger color, behind a confirmation
| Situation | Copy |
|---|---|
| Conversion failed | Couldn't convert this book. Try another copy of the file. |
| Unsupported file | Kindle Drop sends EPUB, AZW3, PDF, and TXT files. |
| Upload failed, offline | Couldn't upload. Kindle Drop retries when you're back online. |
| Unsupported file | Dropcap sends EPUB, AZW3, PDF, and TXT files. |
| Upload failed, offline | Couldn't upload. Dropcap retries when you're back online. |
| Upload failed, server | Couldn't upload. Try again in a few minutes. |
| Pairing code unreadable | This isn't a Kindle Drop pairing code. |
| Pairing code unreadable | This isn't a Dropcap pairing code. |
| Pairing rejected | This pairing code no longer works. Create a new one on your computer. |
| Kindle quiet for days | Kindle hasn't checked in for 3 days. Wake it to receive books. |
| Disconnect dialog | Title "Disconnect Kindle?", body "Books waiting to send stay on this phone.", actions **Disconnect** and **Cancel** |
| Cancel sending dialog | Title "Cancel sending?", body "Reaper's Gale won't reach your Kindle.", actions **Cancel sending** and **Keep** |
| Camera permission | Kindle Drop uses the camera only to scan the pairing code. Actions **Allow camera**, or **Open settings** once Android stops asking |
| Camera permission | Dropcap uses the camera only to scan the pairing code. Actions **Allow camera**, or **Open settings** once Android stops asking |
| Scanner hint | Point the camera at the pairing code |
| Pairing in progress | Connecting |
| Pairing offline | Couldn't connect. Check your connection and try again. |
Expand Down
8 changes: 4 additions & 4 deletions .agents/skills/kindle-drop-ui/mockups.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<!-- Agreed screen designs for Kindle Drop (2026-10-28). Light theme, colors from apps/mobile/src/lib/theme.ts. -->
<html><head><meta charset="utf-8"><title>Kindle Drop screens</title>
<!-- Agreed screen designs for Dropcap (2026-10-28). Light theme, colors from apps/mobile/src/lib/theme.ts. -->
<html><head><meta charset="utf-8"><title>Dropcap screens</title>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&display=swap" rel="stylesheet">
<style>
:root{--screen:#fafafa;--card:#fff;--fg:#18181b;--fg2:#52525b;--muted:#71717a;--ter:#a1a1aa;--border:#e4e4e7;--sep:rgba(228,228,231,.7);--primary:#0891b2;--primaryText:#0e7490;--subtle:#f4f4f5;--danger:#b91c1c;--prom:#18181b}
Expand Down Expand Up @@ -58,7 +58,7 @@

<div class="cell"><div class="phone">
<div class="sb"><span>9:41</span><span>●●● ▮</span></div>
<div class="bar"><h1>Kindle Drop</h1><div class="ib"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="3"/><circle cx="12" cy="12" r="8"/></svg></div></div>
<div class="bar"><h1>Dropcap</h1><div class="ib"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="3"/><circle cx="12" cy="12" r="8"/></svg></div></div>
<div class="body">
<div class="chip"><span class="dot"></span>Kindle checked in 2 h ago</div>
<div class="sec">Sending</div>
Expand Down Expand Up @@ -86,7 +86,7 @@

<div class="cell"><div class="phone">
<div class="sb"><span>9:41</span><span>●●● ▮</span></div>
<div class="bar"><h1>Kindle Drop</h1><div class="ib"></div></div>
<div class="bar"><h1>Dropcap</h1><div class="ib"></div></div>
<div class="empty">
<svg width="44" height="44" viewBox="0 0 24 24" fill="none" stroke="#a1a1aa" stroke-width="1.5"><path d="M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"/><path d="M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"/><path d="M3 6v13M12 6v13M21 6v13"/></svg>
<h2 style="margin-top:6px">No books yet</h2>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<img src="assets/icon.svg" width="64" height="64" alt="">
<img src="apps/mobile/assets/icon-production.png" width="64" height="64" alt="">

# kindle-drop
35 changes: 21 additions & 14 deletions apps/mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,46 @@ const APP_VARIANTS = ["development", "preview", "production"] as const;

type AppVariant = (typeof APP_VARIANTS)[number];

type AdaptiveIcon = NonNullable<NonNullable<ExpoConfig["android"]>["adaptiveIcon"]>;

interface VariantConfig {
readonly appName: string;
readonly scheme: string;
readonly androidPackage: string;
readonly icon: string;
readonly adaptiveBackground: string;
readonly adaptiveIcon: AdaptiveIcon;
}

// Dev and preview wear the flat mark on their own color so they never pass for the real install.
const flatAdaptiveIcon = (backgroundColor: string): AdaptiveIcon => ({
foregroundImage: "./assets/android-icon-mark.png",
backgroundColor,
});

const VARIANT_CONFIG = {
development: {
appName: "Kindle Drop Dev",
appName: "Dropcap Dev",
scheme: "kindledrop-dev",
androidPackage: "com.listlessbird.kindledrop.dev",
icon: "./assets/icon-development.png",
adaptiveBackground: "#d97706",
adaptiveIcon: flatAdaptiveIcon("#d97706"),
},
preview: {
appName: "Kindle Drop Preview",
appName: "Dropcap Preview",
scheme: "kindledrop-preview",
androidPackage: "com.listlessbird.kindledrop.preview",
icon: "./assets/icon-preview.png",
adaptiveBackground: "#7c3aed",
adaptiveIcon: flatAdaptiveIcon("#7c3aed"),
},
production: {
appName: "Kindle Drop",
appName: "Dropcap",
scheme: "kindledrop",
androidPackage: "com.listlessbird.kindledrop",
icon: "./assets/icon-production.png",
adaptiveBackground: "#0891b2",
adaptiveIcon: {
foregroundImage: "./assets/android-icon-foreground.png",
backgroundImage: "./assets/android-icon-background.png",
},
},
} satisfies Record<AppVariant, VariantConfig>;

Expand Down Expand Up @@ -75,11 +86,7 @@ const config: ExpoConfig = {
},
android: {
package: variant.androidPackage,
adaptiveIcon: {
foregroundImage: "./assets/android-icon-foreground.png",
monochromeImage: "./assets/android-icon-foreground.png",
backgroundColor: variant.adaptiveBackground,
},
adaptiveIcon: { ...variant.adaptiveIcon, monochromeImage: "./assets/android-icon-mark.png" },
// JS back dispatch on Android 13-15 also needs withAndroidPredictiveBackCompat.
predictiveBackGestureEnabled: true,
},
Expand Down Expand Up @@ -107,10 +114,10 @@ const config: ExpoConfig = {
[
"expo-splash-screen",
{
// The moon only reads on the night sky, so the splash stays dark in both themes.
image: "./assets/android-icon-foreground.png",
imageWidth: 288,
backgroundColor: "#ffffff",
dark: { backgroundColor: "#0a0a0a" },
backgroundColor: "#15143a",
},
],
[
Expand Down
Binary file added apps/mobile/assets/android-icon-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/mobile/assets/android-icon-foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/mobile/assets/android-icon-mark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/mobile/assets/icon-development.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/mobile/assets/icon-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/mobile/assets/icon-production.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 30 additions & 18 deletions apps/mobile/scripts/export-icons.mts
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
// Renders every app icon from the repo's assets/icon.svg. Rerun after changing the mark or a
// Renders every app icon from the layer SVGs in the repo's assets/. Rerun after changing a layer or a
// variant color, and keep the colors in sync with app.config.ts.
//
// All layers share Android's 108 dp adaptive canvas, so they stack without scaling. Production gets
// the full art; dev and preview get the flat mark on their variant color.
import * as NodeFS from "node:fs";
import * as NodePath from "node:path";
import sharp from "sharp";

const mobileRoot = NodePath.resolve(import.meta.dirname, "..");
const source = NodeFS.readFileSync(NodePath.join(mobileRoot, "../../assets/icon.svg"), "utf8");
const BRAND_FILL = 'fill="#0891b2"';

const VARIANT_FILLS = {
development: "#d97706",
preview: "#7c3aed",
production: "#0891b2",
} as const;
// The markup inside a layer's <svg> root, so layers can be stacked in one document.
const layer = (name: string) =>
NodeFS.readFileSync(NodePath.join(mobileRoot, "../../assets", `icon-${name}.svg`), "utf8")
.replace(/^\s*<svg[^>]*>/, "")
.replace(/<\/svg>\s*$/, "");

const render = (svg: string, file: string) =>
sharp(Buffer.from(svg), { density: 1152 })
const background = layer("background");
const foreground = layer("foreground");
const mark = layer("mark");

const svg = (body: string) =>
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 108 108">${body}</svg>`;

const render = (body: string, file: string) =>
sharp(Buffer.from(svg(body)), { density: 1024 })
.resize(1024, 1024)
.png()
.toFile(NodePath.join(mobileRoot, "assets", file));

if (!source.includes(BRAND_FILL)) throw new Error(`assets/icon.svg no longer uses ${BRAND_FILL}.`);
const FLAT_VARIANTS = { development: "#d97706", preview: "#7c3aed" } as const;

for (const [variant, fill] of Object.entries(VARIANT_FILLS)) {
await render(source.replace(BRAND_FILL, `fill="${fill}"`), `icon-${variant}.png`);
await render(background + foreground, "icon-production.png");

for (const [variant, color] of Object.entries(FLAT_VARIANTS)) {
await render(
`<rect width="108" height="108" fill="${color}"/><g fill="#ffffff">${mark}</g>`,
`icon-${variant}.png`,
);
}

// Android masks adaptive icons to the middle two thirds, so the mark keeps to that safe zone on a
// transparent canvas and the variant color comes from adaptiveIcon.backgroundColor.
const foreground = source
.replace(/<rect[^>]*\/>/, "")
.replace('viewBox="0 0 64 64"', 'viewBox="-16 -16 96 96"');
await render(background, "android-icon-background.png");

await render(foreground, "android-icon-foreground.png");

// Android reads only the monochrome layer's alpha, so the dev and preview foreground can share it.
await render(`<g fill="#ffffff">${mark}</g>`, "android-icon-mark.png");

console.log("Wrote app icons to apps/mobile/assets.");
2 changes: 1 addition & 1 deletion apps/mobile/src/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const RootStack = createNativeStackNavigator({
Library: {
screen: LibraryScreen,
linking: "",
options: { title: "Kindle Drop", headerRight: SettingsButton },
options: { title: "Dropcap", headerRight: SettingsButton },
},
Book: {
screen: BookScreen,
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/features/connect/ScanPairingCodeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function ScanPairingCodeScreen() {
<View className="flex-1 bg-screen px-5" style={{ paddingBottom: insets.bottom + 24 }}>
<View className="flex-1 justify-center px-4">
<AppText textRole="body" className="text-center leading-normal text-foreground-muted">
Kindle Drop uses the camera only to scan the pairing code.
Dropcap uses the camera only to scan the pairing code.
</AppText>
</View>
<Button
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/features/connect/pairingCopy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function pairingErrorMessage(
onSuccess: () => undefined,
onDefect: () => COULD_NOT_CONNECT,
onError: Match.valueTags({
PairingCodeUnreadable: () => "This isn't a Kindle Drop pairing code.",
PairingCodeUnreadable: () => "This isn't a Dropcap pairing code.",
ServerAddressInvalid: () => "Enter the full server address, such as https://example.com",
MailboxError: (error) => MAILBOX_COPY[source][error.reason],
ConnectionStoreError: () => COULD_NOT_SAVE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function ComponentCatalogScreen() {

<EmptyState
title="No books yet"
detail="Share a book to Kindle Drop and it shows up here."
detail="Share a book to Dropcap and it shows up here."
actionLabel="Add a book"
onAction={() => {}}
/>
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/features/library/libraryCopy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import type { MailboxErrorReason } from "../../lib/mailboxClient";
import { relativeTime } from "../../lib/relativeTime";
import { BookStatus, type Book, type UploadFailure } from "../sending/book";

export const UNSUPPORTED_FILE = "Kindle Drop sends EPUB, AZW3, PDF, and TXT files.";
export const UNSUPPORTED_FILE = "Dropcap sends EPUB, AZW3, PDF, and TXT files.";

export const FILE_UNREADABLE = "Couldn't open this file. Try sharing it again.";

const CONVERT_FAILED = "Couldn't convert this book. Try another copy of the file.";

const UPLOAD_FAILED: Readonly<Record<UploadFailure, string>> = {
unreachable: "Couldn't upload. Kindle Drop retries when you're back online.",
unreachable: "Couldn't upload. Dropcap retries when you're back online.",
unexpected: "Couldn't upload. Try again in a few minutes.",
unauthorized: "This pairing code no longer works. Create a new one on your computer.",
missing: "Couldn't find this book's file. Share it again.",
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/lib/mailboxClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export type { ItemKey, MailboxStatus };

/**
* Why a mailbox request failed, in the terms the UI explains: the key was refused, the server could
* not be reached, or it answered with something that is not a Kindle Drop mailbox.
* not be reached, or it answered with something that is not a Dropcap mailbox.
*/
export const MailboxErrorReason = Schema.Literals(["unauthorized", "unreachable", "unexpected"]);

Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/lib/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type ThemeId = (typeof THEME_IDS)[number];
export const DEFAULT_THEME_ID: ThemeId = "kindle-drop";

export const THEME_OPTIONS: ReadonlyArray<{ readonly id: ThemeId; readonly label: string }> = [
{ id: "kindle-drop", label: "Kindle Drop" },
{ id: "kindle-drop", label: "Dropcap" },
{ id: "material-you", label: "Material You" },
];

Expand Down
2 changes: 1 addition & 1 deletion apps/worker/scripts/pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const pair = Command.make(

return Console.log(`${renderUnicodeCompact(link, { border: 2 })}\n\n${link}`);
},
).pipe(Command.withDescription("Print the pairing code for the Kindle Drop app."));
).pipe(Command.withDescription("Print the pairing code for the Dropcap app."));

const secrets = ConfigProvider.layer(
ConfigProvider.fromDotEnv({ path: secretsFile }).pipe(
Expand Down
23 changes: 23 additions & 0 deletions assets/icon-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions assets/icon-foreground.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions assets/icon-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions assets/icon.svg

This file was deleted.

Loading