A local-first multi-agent app development platform, built on PenguinHarness
fix(web): draw the shortcuts launcher one size larger (#732)
Yaowei Zhengad1d77ba06b1
diff --git a/changelog/unreleased/2026-09-15-launcher-size.md b/changelog/unreleased/2026-09-15-launcher-size.mdnew file mode 100644index 00000000..1591f574--- /dev/null+++ b/changelog/unreleased/2026-09-15-launcher-size.md@@ -0,0 +1,11 @@+# The shortcuts launcher is drawn larger++- **Date:** 2026-09-15+- **Type:** fix+- **Scope:** `web`++[中文版](2026-09-15-launcher-size.zh.md)++## What changed++- The floating shortcuts launcher on the conversation's right edge is one size larger throughout: the ball is 56px (was 44), its face glyph 22px (was 18), each fan entry 46px with a 19px glyph (were 36 and 15), and the caption under the ball is 13px text (was 11). The ring's resting radius grows to 112px to keep the same air between entries, and its ceiling follows the phone-width bound. The ball's 32px inset from the edge and everything else about the launcher are unchanged.diff --git a/changelog/unreleased/2026-09-15-launcher-size.zh.md b/changelog/unreleased/2026-09-15-launcher-size.zh.mdnew file mode 100644index 00000000..97d2afe7--- /dev/null+++ b/changelog/unreleased/2026-09-15-launcher-size.zh.md@@ -0,0 +1,11 @@+# 快捷方式悬浮球整体放大++- **Date:** 2026-09-15+- **Type:** fix+- **Scope:** `web`++[English](2026-09-15-launcher-size.md)++## 变更内容++- 对话区右缘的快捷方式悬浮球整体放大一档:球体 56px(原 44),球面图标 22px(原 18),每枚入口 46px、图标 19px(原 36 与 15),球下小字 13px(原 11)。弧的静止半径相应放到 112px 以保持入口之间的空气,上限随手机宽度的约束调整。球与边缘的 32px 距离及其余行为不变。diff --git a/packages/web/src/features/dock/dock-launcher-state.ts b/packages/web/src/features/dock/dock-launcher-state.tsindex 8923636c..4849721f 100644--- a/packages/web/src/features/dock/dock-launcher-state.ts+++ b/packages/web/src/features/dock/dock-launcher-state.ts@@ -20,8 +20,8 @@ export const LAUNCHER_Y_KEY = "penguin.dock.launcherY";export const LAUNCHER_HIDDEN_KEY = "penguin.dock.launcherHidden";const LAUNCHER_HIDDEN_ON = "1";const LAUNCHER_HIDDEN_OFF = "0";-/** The ball's diameter (px). */-export const LAUNCHER_SIZE = 44;+/** The ball's diameter (px). Raised from 44 on 2026-09-15: the ball, its entries and the caption read too small. */+export const LAUNCHER_SIZE = 56;/** Room kept between the ball and the body's top and bottom edges (px). */export const LAUNCHER_EDGE_MARGIN = 12;/** Where the ball rests until the user moves it: centred on the body's height. */@@ -31,10 +31,10 @@ export const DEFAULT_LAUNCHER_RATIO = 0.5;* height. It hangs outside the ball's box, so the vertical clamp has to reserve it or the* caption would be the first thing the composer covers.*/-export const LAUNCHER_CAPTION_HEIGHT = 26;+export const LAUNCHER_CAPTION_HEIGHT = 30;/** A fan entry's diameter (px), one rung under the ball so the fan reads as its offspring. */-export const FAN_ENTRY_SIZE = 36;+export const FAN_ENTRY_SIZE = 46;/*** The ring's radius at rest (px): how far an entry's centre sits from the ball's centre* while the whole semicircle is available.@@ -42,24 +42,24 @@ export const FAN_ENTRY_SIZE = 36;* The floor is the tightest packing that arc produces. Seven entries — five panel kinds,* the terminal, and the hide entry — spread evenly over a semicircle leave a chord of* 2R·sin(step / 2) between neighbours, with step = pi / 6, so keeping FAN_ENTRY_GAP of air- * around the 36px circles needs 44 / (2·sin 15°) ≈ 85px. 92 is that with a few pixels to- * spare (a chord of ≈ 48px, some 12px of air), and it keeps the ring close enough to the+ * around the 46px circles needs 54 / (2·sin 15°) ≈ 104px. 112 is that with a few pixels to+ * spare (a chord of ≈ 58px, some 12px of air), and it keeps the ring close enough to the* ball to read as one object. The arc only ever grows from here, and only where a trimmed* span would otherwise crowd the entries together.*/-export const FAN_MIN_RADIUS = 92;+export const FAN_MIN_RADIUS = 112;/** Air kept between two neighbouring entries' circles (px). */export const FAN_ENTRY_GAP = 8;/*** The widest the ring may grow (px). Real geometry never asks for this much — a ball parked- * against the body's top edge, the tightest span seven entries ever get, settles at ≈ 161px.- * It is there for a body barely taller than the entries themselves, where no radius can- * space them apart (the arc that fits keeps a bounded length however far the ring is pushed- * out) and the solver below would otherwise run away with them off the left of the screen.- * The ceiling is the narrow layout's width: on a ~320px phone the ball's centre sits 54px- * from the edge, so an entry's far side, R + 18, has to fit the 266px left of it.+ * against the body's top edge, the tightest span seven entries ever get, settles well under+ * 200px. It is there for a body barely taller than the entries themselves, where no radius+ * can space them apart (the arc that fits keeps a bounded length however far the ring is+ * pushed out) and the solver below would otherwise run away with them off the left of the+ * screen. The ceiling is the narrow layout's width: on a ~320px phone the ball's centre sits+ * 60px from the edge, so an entry's far side, R + 23, has to fit the 260px left of it.*/-export const FAN_MAX_RADIUS = 240;+export const FAN_MAX_RADIUS = 232;/** Room kept between an entry and the body's top or bottom edge (px). */const FAN_EDGE_PAD = 4;/**diff --git a/packages/web/src/features/dock/dock-launcher.tsx b/packages/web/src/features/dock/dock-launcher.tsxindex bb27169c..88034b42 100644--- a/packages/web/src/features/dock/dock-launcher.tsx+++ b/packages/web/src/features/dock/dock-launcher.tsx@@ -85,7 +85,7 @@ import {/*** The ball's inset from the body's right edge (px): the ball floats well clear of the edge* rather than sitting against it, and that room is what keeps the caption centred. A caption- * centred under the ball may be up to LAUNCHER_SIZE + 2·EDGE_INSET − 12 ≈ 96px wide before+ * centred under the ball may be up to LAUNCHER_SIZE + 2·EDGE_INSET − 12 ≈ 108px wide before* it touches the body's edge — wider than the longest name it shows ("Hide launcher"), so* nothing has to slide sideways to stay inside.*/@@ -140,7 +140,7 @@ interface FanState {interface FanEntry {key: string;label: string;- /** Drawn twice at two sizes: 15px in the fan, 18px in the ball while this entry is pointed at. */+ /** Drawn twice at two sizes: ICON_SIZE.launcherEntry in the fan, ICON_SIZE.launcherBall in the ball while this entry is pointed at. */glyphAt: (size: number) => ReactNode;badge: boolean;testId: string;@@ -158,7 +158,7 @@ const ENTRY_CLASS =* entry is hovered or focused, and the launcher's own caption the rest of the time.*/const CAPTION_CLASS =- "pointer-events-none absolute whitespace-nowrap rounded-md border border-gray-200/80 bg-white/85 px-1.5 py-0.5 text-[11px] font-medium leading-4 shadow-[0_1px_4px_rgba(0,0,0,0.08)] backdrop-blur-md transition-colors duration-150 dark:border-white/10 dark:bg-gray-900/85";+ "pointer-events-none absolute whitespace-nowrap rounded-md border border-gray-200/80 bg-white/85 px-2 py-0.5 text-[13px] font-medium leading-5 shadow-[0_1px_4px_rgba(0,0,0,0.08)] backdrop-blur-md transition-colors duration-150 dark:border-white/10 dark:bg-gray-900/85";const BALL_CLASS ="anim-pop relative flex touch-none select-none items-center justify-center rounded-full border border-gray-200/80 text-gray-500 shadow-[0_2px_10px_rgba(0,0,0,0.10)] backdrop-blur-md transition-[background-color,color,opacity,box-shadow] duration-150 hover:bg-white/95 hover:text-gray-800 hover:opacity-100 hover:shadow-[0_4px_16px_rgba(0,0,0,0.14)] focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent-bg)] dark:border-white/10 dark:text-gray-400 dark:hover:bg-gray-800/95 dark:hover:text-gray-100";@@ -478,11 +478,11 @@ function LauncherBall({const ballAction = fanOpen ? S.dock.launcherClose : S.dock.launcherOpen;const captionText = hovered?.label ?? (ballActive ? ballAction : S.dock.launcherCaption);const ballGlyph = hovered ? (- hovered.glyphAt(ICON_SIZE.sectionMark)+ hovered.glyphAt(ICON_SIZE.launcherBall)) : (<GlyphIcond={ballActive ? (fanOpen ? COLLAPSE_ICON : EXPAND_ICON) : WORKBENCH_ICON}- size={ICON_SIZE.sectionMark}+ size={ICON_SIZE.launcherBall}/>);@@ -546,7 +546,7 @@ function LauncherBall({} as CSSProperties}>- {entry.glyphAt(ICON_SIZE.iconButton)}+ {entry.glyphAt(ICON_SIZE.launcherEntry)}{entry.badge && (<spanaria-hiddendiff --git a/packages/web/src/lib/icon-scale.ts b/packages/web/src/lib/icon-scale.tsindex 8a34f7bc..548ef97c 100644--- a/packages/web/src/lib/icon-scale.ts+++ b/packages/web/src/lib/icon-scale.ts@@ -39,6 +39,14 @@ export const ICON_SIZE = {groupHeaderAvatar: 18,/** A mark that anchors a whole block rather than a line: the mobile top bar, a confirm dialog's tinted disc. */sectionMark: 18,+ /**+ * The floating launcher's ball face (features/dock/dock-launcher.tsx): a control that+ * floats over the conversation on its own, with nothing beside it to size against, so it+ * sits above every in-flow rung. Its entries take the rung below.+ */+ launcherBall: 22,+ /** A fan entry of the floating launcher: a glyph alone in a round button one rung under the ball. */+ launcherEntry: 19,/** The rotating collapse chevron. */chevron: 14,/** The collapse chevron in a dense row (an 11px folder row, a banner). */