diff --git a/docs/performance.md b/docs/performance.md index 6ce1550f94..9d9107258e 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -706,9 +706,10 @@ dictation button draws a disabled microphone of the same size until its chunk lands. `qrcode` loads when a code is drawn. The modules the boot shares with a lazy chunk are one `boot` chunk (a Rolldown `codeSplitting` group in `vite.config.ts`), because the core speaks HTTP/1.1 and a browser fetches six -files at a time. Geist and Geist Mono ship as latin, latin-ext and rest -subsets with their weight axis; the mono latin cut carries the arrows and box -drawing a terminal draws. +files at a time. Geist Mono ships as latin, latin-ext and rest subsets with +its weight axis; its latin cut carries the arrows and box drawing a terminal +draws. The text faces (Inter, Atkinson Hyperlegible Next, Source Sans 3, IBM +Plex Sans) ship as latin and latin-ext. A part whose chunk has not landed says it is loading, one whose chunk failed offers a retry, and every failed part asks again when the browser is back diff --git a/packages/ui/index.html b/packages/ui/index.html index abdff164ac..5de79a7181 100644 --- a/packages/ui/index.html +++ b/packages/ui/index.html @@ -44,7 +44,7 @@ // before the stylesheet so the first frame is drawn in it. The sans face // only: the first screen draws no mono text, and on a slow link a mono // file would compete with the entry chunk. - var faces = { geist: 'Geist-latin', inter: 'Inter-latin', plex: 'IBMPlexSans-latin', atkinson: 'AtkinsonHyperlegibleNext-latin', figtree: 'Figtree-latin', source: 'SourceSans3-latin', dm: 'DMSans-latin', system: '' }; + var faces = { inter: 'Inter-latin', atkinson: 'AtkinsonHyperlegibleNext-latin', source: 'SourceSans3-latin', plex: 'IBMPlexSans-latin', system: '' }; var face = localStorage.getItem('boite.font'); if (face === null || !Object.prototype.hasOwnProperty.call(faces, face)) face = 'inter'; if (face !== 'inter') document.documentElement.dataset.font = face; diff --git a/packages/ui/public/fonts/DMSans-OFL.txt b/packages/ui/public/fonts/DMSans-OFL.txt deleted file mode 100644 index 917aaa6631..0000000000 --- a/packages/ui/public/fonts/DMSans-OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts) DMSans-Italic[opsz,wght].ttf: Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/packages/ui/public/fonts/DMSans-latin-ext.woff2 b/packages/ui/public/fonts/DMSans-latin-ext.woff2 deleted file mode 100644 index 6e84cba194..0000000000 Binary files a/packages/ui/public/fonts/DMSans-latin-ext.woff2 and /dev/null differ diff --git a/packages/ui/public/fonts/DMSans-latin.woff2 b/packages/ui/public/fonts/DMSans-latin.woff2 deleted file mode 100644 index c75f7bf1b4..0000000000 Binary files a/packages/ui/public/fonts/DMSans-latin.woff2 and /dev/null differ diff --git a/packages/ui/public/fonts/Figtree-OFL.txt b/packages/ui/public/fonts/Figtree-OFL.txt deleted file mode 100644 index 9766a6f815..0000000000 --- a/packages/ui/public/fonts/Figtree-OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree) Figtree-Italic[wght].ttf: Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/packages/ui/public/fonts/Figtree-latin-ext.woff2 b/packages/ui/public/fonts/Figtree-latin-ext.woff2 deleted file mode 100644 index a8a112383a..0000000000 Binary files a/packages/ui/public/fonts/Figtree-latin-ext.woff2 and /dev/null differ diff --git a/packages/ui/public/fonts/Figtree-latin.woff2 b/packages/ui/public/fonts/Figtree-latin.woff2 deleted file mode 100644 index 05ce657de8..0000000000 Binary files a/packages/ui/public/fonts/Figtree-latin.woff2 and /dev/null differ diff --git a/packages/ui/public/fonts/Geist-latin-ext.woff2 b/packages/ui/public/fonts/Geist-latin-ext.woff2 deleted file mode 100644 index cb7b0318f2..0000000000 Binary files a/packages/ui/public/fonts/Geist-latin-ext.woff2 and /dev/null differ diff --git a/packages/ui/public/fonts/Geist-latin.woff2 b/packages/ui/public/fonts/Geist-latin.woff2 deleted file mode 100644 index 18cda62717..0000000000 Binary files a/packages/ui/public/fonts/Geist-latin.woff2 and /dev/null differ diff --git a/packages/ui/public/fonts/Geist-rest.woff2 b/packages/ui/public/fonts/Geist-rest.woff2 deleted file mode 100644 index b55d317e7a..0000000000 Binary files a/packages/ui/public/fonts/Geist-rest.woff2 and /dev/null differ diff --git a/packages/ui/src/app.css b/packages/ui/src/app.css index 1a0a8ea52f..8a5394f40b 100644 --- a/packages/ui/src/app.css +++ b/packages/ui/src/app.css @@ -5,40 +5,13 @@ */ /* - * Geist and Geist Mono, variable on wght, cut like the faces below into latin - * and latin extended, plus a third file holding every other glyph of the font + * Geist Mono, variable on wght, cut like the faces below into latin and latin + * extended, plus a third file holding every other glyph of the font * (Greek, Cyrillic, Vietnamese, fractions), so no character changes face. The * latin cut also carries the arrows, key, box drawing, block and geometric * symbols (U+2190-27BF) the UI and the terminal draw. */ -@font-face { - font-family: 'Geist'; - font-style: normal; - font-weight: 100 900; - font-display: swap; - src: url('/fonts/Geist-latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-27BF, U+2212, U+2215, U+FEFF, U+FFFD; -} - -@font-face { - font-family: 'Geist'; - font-style: normal; - font-weight: 100 900; - font-display: swap; - src: url('/fonts/Geist-latin-ext.woff2') format('woff2'); - unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; -} - -@font-face { - font-family: 'Geist'; - font-style: normal; - font-weight: 100 900; - font-display: swap; - src: url('/fonts/Geist-rest.woff2') format('woff2'); - unicode-range: U+02D8-02D9, U+02DB, U+0300-0303, U+0306-0307, U+0309-030C, U+0312, U+031B, U+0323, U+0326-0328, U+0335-0338, U+039B, U+03A9, U+03BB-03BC, U+03C0, U+03C9, U+0400-045F, U+0462-0463, U+046A-046B, U+0472-0475, U+0490-0493, U+0496-0497, U+049A-049B, U+04A2-04A3, U+04AE-04B3, U+04B6-04B7, U+04BA-04BB, U+04C0, U+04CF, U+04D8-04D9, U+04E2-04E3, U+04E8-04E9, U+04EE-04EF, U+0E3F, U+1EA0-1EF1, U+2070, U+2074-2079, U+2080-2089, U+2116-2117, U+2153-2155, U+215B-215E, U+3003, U+301C, U+F8FF, U+FB01-FB02; -} - @font-face { font-family: 'Geist Mono'; font-style: normal; @@ -67,10 +40,13 @@ } /* - * The faces Settings, Appearance offers beside Geist (lib/fonts.ts), Inter - * the default, from Fontsource's variable builds, each cut into latin and latin extended: a file + * The text faces Settings, Appearance offers (lib/fonts.ts), Inter the + * default, from Fontsource's variable builds, each cut into latin and latin extended: a file * is fetched only once a glyph of its range is drawn in that face, so a face - * nobody picked costs this rule and nothing else. Licences beside them. + * nobody picked costs this rule and nothing else. Licences beside them. Kept + * for reading (2026-10-18): Atkinson Hyperlegible Next, IBM Plex Sans and + * Source Sans 3 tell I, l and 1 apart and keep open shapes; Geist, Figtree and + * DM Sans went, each a closed or geometric face that repeated another. */ @font-face { @@ -127,24 +103,6 @@ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; } -@font-face { - font-family: 'Figtree'; - font-style: normal; - font-weight: 100 900; - font-display: swap; - src: url('/fonts/Figtree-latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -@font-face { - font-family: 'Figtree'; - font-style: normal; - font-weight: 100 900; - font-display: swap; - src: url('/fonts/Figtree-latin-ext.woff2') format('woff2'); - unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; -} - @font-face { font-family: 'Source Sans 3'; font-style: normal; @@ -163,24 +121,6 @@ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; } -@font-face { - font-family: 'DM Sans'; - font-style: normal; - font-weight: 100 900; - font-display: swap; - src: url('/fonts/DMSans-latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -@font-face { - font-family: 'DM Sans'; - font-style: normal; - font-weight: 100 900; - font-display: swap; - src: url('/fonts/DMSans-latin-ext.woff2') format('woff2'); - unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; -} - @font-face { font-family: 'JetBrains Mono'; font-style: normal; @@ -315,13 +255,10 @@ /* Every face Settings, Appearance offers, one stack each: the pick swaps `--font-sans` or `--font-mono` below, and each tile of the picker is drawn in its own. */ - --face-geist: 'Geist', var(--font-fallback); --face-inter: 'Inter', var(--font-fallback); --face-plex: 'IBM Plex Sans', var(--font-fallback); --face-atkinson: 'Atkinson Hyperlegible Next', var(--font-fallback); - --face-figtree: 'Figtree', var(--font-fallback); --face-source: 'Source Sans 3', var(--font-fallback); - --face-dm: 'DM Sans', var(--font-fallback); --face-system: 'Segoe UI Variable Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --face-mono-geist: 'Geist Mono', var(--font-mono-fallback); --face-mono-jetbrains: 'JetBrains Mono', var(--font-mono-fallback); @@ -741,12 +678,9 @@ html[data-chat-width='full'] { } /* The face picked under Settings, Appearance (lib/fonts.ts); Inter, the default, stamps nothing. */ -[data-font='geist'] { --font-sans: var(--face-geist); } [data-font='plex'] { --font-sans: var(--face-plex); } [data-font='atkinson'] { --font-sans: var(--face-atkinson); } -[data-font='figtree'] { --font-sans: var(--face-figtree); } [data-font='source'] { --font-sans: var(--face-source); } -[data-font='dm'] { --font-sans: var(--face-dm); } [data-font='system'] { --font-sans: var(--face-system); } [data-mono='jetbrains'] { --font-mono: var(--face-mono-jetbrains); } [data-mono='system'] { --font-mono: var(--face-mono-system); } @@ -817,8 +751,10 @@ html[data-chat-width='full'] { --color-composer-focus: color-mix(in oklch, var(--color-accent) 55%, transparent); /* Replaces the resting shadow on focus, slot for slot so it animates: a bloom under the box, the top reflection put out (it would double the lit edge), then a blurred halo. Every layer is blurred: a - spread-only ring draws a second, hard outline. The edge itself is a gradient, below. */ - --composer-glow: 0 14px 40px -18px color-mix(in oklch, var(--color-accent) 50%, transparent), inset 0 1px 0 transparent, 0 0 24px -8px color-mix(in oklch, var(--color-accent) 30%, transparent); + spread-only ring draws a second, hard outline. The halo spreads outward: a negative spread shrinks + its corner radius below the box's, and the corners went darker than the sides (19 against 30 of + luminance, 4 px out, on the dark ground at 16). The edge itself is a gradient, below. */ + --composer-glow: 0 12px 32px -6px color-mix(in oklch, var(--color-accent) 30%, transparent), inset 0 1px 0 transparent, 0 0 14px 4px color-mix(in oklch, var(--color-accent) 13%, transparent); --composer-edge: linear-gradient(to bottom, color-mix(in oklch, var(--color-accent) 85%, var(--color-foreground)), color-mix(in oklch, var(--color-accent) 50%, transparent) 45%, color-mix(in oklch, var(--color-accent) 24%, transparent)); --color-control-surface: color-mix(in oklab, var(--color-surface-2) 82%, transparent); --color-control-hover: color-mix(in oklab, var(--color-surface-3) 90%, transparent); @@ -826,7 +762,7 @@ html[data-chat-width='full'] { } /* On a light page the bloom reads stronger: half as much. */ [data-theme='light'] { - --composer-glow: 0 12px 36px -18px color-mix(in oklch, var(--color-accent) 36%, transparent), inset 0 1px 0 transparent, 0 0 20px -8px color-mix(in oklch, var(--color-accent) 22%, transparent); + --composer-glow: 0 12px 32px -6px color-mix(in oklch, var(--color-accent) 22%, transparent), inset 0 1px 0 transparent, 0 0 14px 4px color-mix(in oklch, var(--color-accent) 9%, transparent); } } diff --git a/packages/ui/src/components/AppearancePage.svelte b/packages/ui/src/components/AppearancePage.svelte index 0e13794e76..b6a9d58fd0 100644 --- a/packages/ui/src/components/AppearancePage.svelte +++ b/packages/ui/src/components/AppearancePage.svelte @@ -38,13 +38,10 @@ * carries: nothing but this picker reads them. */ const FONT_NAMES: Record, string> = { - geist: 'Geist', inter: 'Inter', - plex: 'IBM Plex Sans', atkinson: 'Atkinson Hyperlegible', - figtree: 'Figtree', source: 'Source Sans 3', - dm: 'DM Sans' + plex: 'IBM Plex Sans' }; const MONO_NAMES: Record, string> = { geist: 'Geist Mono', jetbrains: 'JetBrains Mono' }; @@ -263,7 +260,7 @@

{strings.settings.reading}

- {strings.settings.font} + {strings.settings.font}
{#each faces as face (face.id)}
@@ -124,6 +131,10 @@ {project ? projectName(project) : strings.drafts.name} + {#if machine} + {strings.thread.onMachine} + {machine.label} + {/if} {#if draftChoice || store.draft?.worktree}

@@ -179,6 +190,10 @@ .project-choice :global(.trigger) { min-height: var(--row); height: auto; max-width: 100%; padding: 7px 12px; gap: 8px; } .project-label { min-width: 0; overflow-wrap: anywhere; } .mobile-welcome { display: none; } + /* The machine reads as part of the sentence: no outline, since nothing opens from it. */ + .machine { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; } + .machine :global(svg) { flex: none; color: var(--color-muted-foreground); } + .machine .ui-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .none { margin: auto; padding: 40px; @@ -289,6 +304,8 @@ .mobile-welcome h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.6px; line-height: 1.2; } .mobile-welcome p { margin: 0 0 6px; font-size: var(--text-sm); line-height: 1.6; color: var(--color-muted-foreground); } .mobile-welcome small { color: var(--color-muted-foreground); font-size: var(--text-xs); } + .mobile-place { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: 100%; font-size: var(--text-md); font-weight: 600; } + .mobile-place .machine { gap: 6px; } .draft-body { padding: 24px; align-items: center; min-height: 0; overflow-y: auto; } diff --git a/packages/ui/src/components/ComposerBar.svelte b/packages/ui/src/components/ComposerBar.svelte index adddd24685..9fcd834619 100644 --- a/packages/ui/src/components/ComposerBar.svelte +++ b/packages/ui/src/components/ComposerBar.svelte @@ -23,7 +23,7 @@ import { speedControl } from '../lib/model-speeds'; /** - * The row under the composer's box: the model, effort, mode and worktree + * The row under the composer's box: the model, effort, worktree and mode * chips (folded into Options on a phone), then stop, attach, dictation and * send. A pick on a thread is saved at once, after the switch warnings; on a * draft the whole choice is remembered. `choice`, `picking` and `dictating` @@ -248,14 +248,6 @@ pickEffort(null) : undefined} {speeds} speed={speedOptions.speed} onspeed={(speed) => void pick(speedOptions.pick(speed))} /> {/if} - {#if modes.length > 0} -

- {@const ModeIcon = modeIcon(displayedMode)} - - {modeLabel(displayedMode, provider)} - - {/if} - {#if store.draft && draftRepository} {/if} + + {#if modes.length > 0} + + {@const ModeIcon = modeIcon(displayedMode)} + + {modeLabel(displayedMode, provider)} + + {/if}
{/if} diff --git a/packages/ui/src/components/RightPanel.svelte b/packages/ui/src/components/RightPanel.svelte index bfb203eddc..1d160e8310 100644 --- a/packages/ui/src/components/RightPanel.svelte +++ b/packages/ui/src/components/RightPanel.svelte @@ -518,6 +518,13 @@ width: var(--control-sm); } + /* Only the tabs give way. A control that shrank too took part of the room the + chevrons cost, so the tabs lost less than `measure` counted and the + chevrons went and came back on every frame at the panel's narrowest. */ + .strip > :not(.tabs, .spacer) { + flex: none; + } + .tabs { display: flex; align-items: center; diff --git a/packages/ui/src/components/ThreadCard.svelte b/packages/ui/src/components/ThreadCard.svelte index c86b37804e..609d5c33c6 100644 --- a/packages/ui/src/components/ThreadCard.svelte +++ b/packages/ui/src/components/ThreadCard.svelte @@ -328,14 +328,18 @@ flex: 0 1 auto; margin-left: auto; } + /* Centred on the title's line, 21 px under the row's 1 px border and top padding: 26 px buttons at 5 px + sat 1.5 px above it. A whole pixel keeps the icons sharp, so they stay half a pixel high. */ .actions { position: absolute; right: 5px; - top: 5px; + top: 6px; opacity: 0; background: var(--color-surface-2); } - .done { position: absolute; right: 32px; top: 5px; opacity: 0; background: var(--color-surface-2); color: var(--color-muted-foreground); } + .done { position: absolute; right: 32px; top: 6px; opacity: 0; background: var(--color-surface-2); color: var(--color-muted-foreground); } + /* A card with a second line pads its top by one pixel more. */ + .meta .actions, .meta .done { top: 7px; } .thread:hover .done, .thread:focus-within .done { opacity: 1; } .thread:hover .actions, .thread:focus-within .actions { diff --git a/packages/ui/src/lib/fonts.ts b/packages/ui/src/lib/fonts.ts index c4be379e57..c54bdc698f 100644 --- a/packages/ui/src/lib/fonts.ts +++ b/packages/ui/src/lib/fonts.ts @@ -15,7 +15,8 @@ export const FONT_KEY = 'boite.font'; export const MONO_KEY = 'boite.font-mono'; -export const FONTS = ['inter', 'geist', 'plex', 'atkinson', 'figtree', 'source', 'dm', 'system'] as const; +/** A face no longer offered (`geist`, `figtree`, `dm` until 2026-10-18) reads as the default. */ +export const FONTS = ['inter', 'atkinson', 'source', 'plex', 'system'] as const; export type Font = (typeof FONTS)[number]; export const MONOS = ['geist', 'jetbrains', 'system'] as const; diff --git a/packages/ui/src/lib/strings/en/settings.ts b/packages/ui/src/lib/strings/en/settings.ts index 2181897a85..6ab9077130 100644 --- a/packages/ui/src/lib/strings/en/settings.ts +++ b/packages/ui/src/lib/strings/en/settings.ts @@ -88,6 +88,8 @@ export const strings = { themeGrain: 'Grain', reading: 'Reading', font: 'Text font', + /** What the reading studies found, behind the label's "i": why there is a choice at all. */ + fontHint: 'No face reads fastest for everyone: in a 2022 study each reader was about 35% faster in their best face than in their worst, and taste seldom picked the fastest. Try each one on its sample.', fontSystem: 'System', /** Drawn in every face of the picker: mixed case, digits, and the glyphs that get confused (Il1, O0, rn). */ fontSample: 'Rerun the 12 failing tests in Il1/O0/rn.ts', diff --git a/packages/ui/src/lib/strings/en/thread.ts b/packages/ui/src/lib/strings/en/thread.ts index d99a77b416..b7d059af06 100644 --- a/packages/ui/src/lib/strings/en/thread.ts +++ b/packages/ui/src/lib/strings/en/thread.ts @@ -53,6 +53,8 @@ export const strings = { start: 'Start a thread', inWorktree: 'in a worktree', inProject: 'in', + /** Before the machine the draft's project is on, which ends the heading. */ + onMachine: 'on', using: 'using', onEffort: 'on {effort} effort', draftMode: { diff --git a/packages/ui/src/lib/strings/fr/settings.ts b/packages/ui/src/lib/strings/fr/settings.ts index 33ad394ec3..4924bc125f 100644 --- a/packages/ui/src/lib/strings/fr/settings.ts +++ b/packages/ui/src/lib/strings/fr/settings.ts @@ -89,6 +89,7 @@ export const fr: Translation = { themeGrain: 'Grain', reading: 'Lecture', font: 'Police du texte', + fontHint: 'Aucune police n\'est la plus rapide pour tout le monde : dans une étude de 2022, chaque lecteur lisait environ 35 % plus vite dans sa meilleure police que dans sa pire, et le goût choisissait rarement la plus rapide. Essayez chacune sur son exemple.', fontSystem: 'Système', fontSample: 'Relance les 12 tests en échec dans Il1/O0/rn.ts', monoFont: 'Police du code', diff --git a/packages/ui/src/lib/strings/fr/thread.ts b/packages/ui/src/lib/strings/fr/thread.ts index 6d12a09b9a..2e693231ed 100644 --- a/packages/ui/src/lib/strings/fr/thread.ts +++ b/packages/ui/src/lib/strings/fr/thread.ts @@ -53,6 +53,7 @@ export const fr: Translation = { start: 'Lancer une conversation', inWorktree: 'dans un worktree', inProject: 'dans', + onMachine: 'sur', using: 'avec', onEffort: 'en raisonnement {effort}', draftMode: { diff --git a/tests/e2e/orchestration-recovery.test.ts b/tests/e2e/orchestration-recovery.test.ts index e514084cc8..dd0623d5ff 100644 --- a/tests/e2e/orchestration-recovery.test.ts +++ b/tests/e2e/orchestration-recovery.test.ts @@ -27,7 +27,7 @@ for (const viewport of [{ width: 1280, height: 900 }, { width: 390, height: 844 })()`); await page.waitFor('document.querySelector("[data-testid=thread-recovery]") !== null'); if (viewport.width === 1280) { - for (const font of ['inter', 'geist', 'plex', 'atkinson', 'figtree', 'source', 'dm', 'system']) { + for (const font of ['inter', 'atkinson', 'source', 'plex', 'system']) { await page.evaluate(`(async () => { document.documentElement.dataset.font = '${font}'; const family = getComputedStyle(document.body).fontFamily; diff --git a/tests/e2e/panel.test.ts b/tests/e2e/panel.test.ts index 8eee16c63b..15f78baf0d 100644 --- a/tests/e2e/panel.test.ts +++ b/tests/e2e/panel.test.ts @@ -334,3 +334,28 @@ test('an unsaved edit survives a tab switch and its tab asks before closing, at await phone(false); await onStore(`store.panel.closeAll();`); }, 60_000); + +test('the tab strip keeps its chevrons still at every width down to the narrowest', async () => { + await onStore(`store.panel.closeAll(); store.panel.open('agents'); store.panel.open('messages');`); + await page.waitFor(`document.querySelectorAll('${id('panel-tab')}').length === 2`); + // Each width gets a few frames to settle, then must hold: the chevrons used to + // come and go on every frame where the tabs overflowed by a few pixels. + const flipping = await page.evaluate(`(async () => { + const { rightPanel } = await import('/src/lib/right-panel.svelte.ts'); + const before = rightPanel.width; + const frame = () => new Promise(requestAnimationFrame); + const chevrons = () => document.querySelector('${id('panel-titlebar')}').querySelectorAll('.chev').length; + const flipping = []; + for (let width = 300; width <= 420; width += 2) { + rightPanel.width = width; + for (let i = 0; i < 3; i++) await frame(); + let last = chevrons(), flips = 0; + for (let i = 0; i < 8; i++) { await frame(); const now = chevrons(); if (now !== last) flips++; last = now; } + if (flips > 0) flipping.push(width); + } + rightPanel.width = before; + return flipping; + })()`); + expect(flipping).toEqual([]); + await onStore(`store.panel.closeAll();`); +}, 60_000); diff --git a/tests/e2e/text-alignment.test.ts b/tests/e2e/text-alignment.test.ts index a15138d668..15a5334004 100644 --- a/tests/e2e/text-alignment.test.ts +++ b/tests/e2e/text-alignment.test.ts @@ -23,7 +23,7 @@ test('text and icons share a vertical centre across reading fonts, menus and pho ['[data-testid="composer-effort"]', '[data-testid="composer-effort"]'], ['[data-testid="composer-mode"]', '[data-testid="composer-mode"]'], ]; - for (const font of ['inter', 'geist', 'plex', 'atkinson', 'figtree', 'source', 'dm', 'system']) { + for (const font of ['inter', 'atkinson', 'source', 'plex', 'system']) { await page.evaluate(`(async () => { document.documentElement.dataset.font = '${font}'; const style = getComputedStyle(document.body);