From 61085ef7a52481a9284ec08c2466314f04adc9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 26 Sep 2026 06:22:15 -0400 Subject: [PATCH] T23b round 2 fix - the gallery binds its passage's range before the vec, as clippy asks - AGENTS: anything pressable is a Tab stop; text in a row gives way to fixed parts --- AGENTS.md | 2 ++ TASKS.md | 1 + examples/gallery/pages/chat/cite.rs | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 04ba948..57b1346 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -115,6 +115,8 @@ Ely GPUI Component. A component library for GPUI, in light and dark. - Taffy 0.9 hands negative free space to auto margins and centering alike, so a centered child wider than its scroll box starts past the scroll's reach. Center only what fits the measured box (`documents::DocumentViewer`). - A mode that leaves on Escape holds its own focus through `primitives::hold_focus`: turned on while focus is elsewhere, it takes focus so Escape reaches it, and `hand_back` returns it (`documents::ZenMode`, `collab::FollowMode`). - A chat holds at its newest message through gpui's `list` with `ListAlignment::Bottom`: it sticks while scrolled to the end, and `scroll_to` one past the last item sticks it again; that call sends no scroll event, so the owner clears its own away state (`chat::MessageList`). +- Anything pressable is a Tab stop: a row, card or toggle takes `tab_index(0)` and `focus_ring`, with a 1px border that stays transparent where it shows none; gpui presses it on the release of Enter or Space. +- A row that holds text beside fixed parts lets the text give way: the text takes `flex_1().min_w_0()` and an `Ellipsis`; counts, icons, dates and chevrons take `flex_none`. - A mark over a text field reads the field at paint time, from a canvas laid over it (`collab::RemoteCursor`): by then `TextInput::bounds_for` holds this frame's layout, and a still page never renders again to catch up. - A callback field holds a named `type` alias; clippy's type_complexity rejects `Option>`. A chapter shares one alias per shape. - A component that fills its container says `w_full` on its root. As a window's root, or in a flex row, it would shrink to its text's narrowest width. diff --git a/TASKS.md b/TASKS.md index 4ca907d..d7020e8 100644 --- a/TASKS.md +++ b/TASKS.md @@ -259,3 +259,4 @@ Per-component lines live in `tasks/`. Tags there: | T23a | 1 | FAIL | a long message of yours overflowed a narrow column; pictures and video sized to the theme, not their column; a finished stream kept revealing; avatar pictures from the web were read as files; the list stayed away after it fit again; the reasoning toggle had no Tab stop; a link's thumbnail lost its corners | | T23a | 2 | PASS | | | T23b | 1 | FAIL | source cards and web results with a handler were no Tab stops; in a narrow column the sources row and a passage's header ran past their edge | +| T23b | 2 | FAIL | the gallery's narrow passage built a vec of one range, which clippy refuses, so the checks failed | diff --git a/examples/gallery/pages/chat/cite.rs b/examples/gallery/pages/chat/cite.rs index bc4fade..9017ad1 100644 --- a/examples/gallery/pages/chat/cite.rs +++ b/examples/gallery/pages/chat/cite.rs @@ -86,6 +86,7 @@ pub fn search(_: &mut Window, cx: &mut App) -> impl IntoElement + use<> { let more = PASSAGE .find("more lift") .expect("the passage holds its match"); + let lifted = more..more + "more lift".len(); section( "SearchProgress / WebResultCard / DocumentChunkPreview", "A search as it runs, step by step; a result as the web gives it; and a passage found in a document, the words that matched washed.", @@ -131,7 +132,7 @@ pub fn search(_: &mut Window, cx: &mut App) -> impl IntoElement + use<> { "a-long-name-for-the-lift-notes.pdf", "Page 1 ยท Dark is not inverted", PASSAGE, - vec![more..more + "more lift".len()], + vec![lifted], ) .score(0.86), ),