From abc226d4b329a472dda0df8d0246a96b507ca796 Mon Sep 17 00:00:00 2001 From: Tryanks Date: Mon, 23 Nov 2026 05:44:43 +0800 Subject: [PATCH 01/12] Principles: upstream for behaviour, the look is Tcode's own Principle 6 now separates what gpui-base provides (behaviour primitives, used as they are) from how the interface looks (type scale, spacing, radii, elevation, colours, motion timing, components), which is Tcode's to design. The slop-audit pattern on motion cites Principle 7, where that rule lives. --- .agents/skills/slop-audit/PATTERNS.md | 2 +- CONTRIBUTING.md | 30 +++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.agents/skills/slop-audit/PATTERNS.md b/.agents/skills/slop-audit/PATTERNS.md index fb84f2102..e462d33aa 100644 --- a/.agents/skills/slop-audit/PATTERNS.md +++ b/.agents/skills/slop-audit/PATTERNS.md @@ -205,7 +205,7 @@ Each was found in one lane and is likely elsewhere. asserted. - **Motion as a contract**: a frame count, a fraction of an animation reached at a given frame, a pixel offset, with no user path depending on the number - (Principle 6). + (Principle 7). - **The test rebuilds the production loop**: aborts the real task, edits its private throttle, calls its private step by hand. - **The driver is unlike the real peer**: a test browser that never closes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5d4d17768..20c91f83c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,21 +59,21 @@ is derived from it. **Process** is how to build, check and submit work. sees it; and no SLA is promised. Current status and plan: [#376](https://github.com/Tryanks/tcode/issues/376). -6. **gpui-base is the infrastructure; no house UI principles.** Tcode follows - the recommendations and defaults of gpui-base and gpui-kit, and keeps no - separate design contract in sync with the code: no house-wide UI rules of - its own, such as a single duration for every transition or classes of - change that must stay instant. Everything gpui-base - provides on top of GPUI — selection, scrolling, positioning, dismissal, - focus, theme tokens, motion, virtual lists, form controls — is used as it - is, defaults included, before anything of the kind is written in Tcode. - Tcode's own components are styled compositions of those primitives; they - never re-derive a primitive's rules locally. Where gpui-base demonstrably - cannot meet the need, Tcode builds what is missing — a primitive - reimplemented, a default overridden, or an element gpui-base does not have - — and the site names that gap; it is removed once gpui-base closes it. - This principle decides how something is built, never whether it is built: - what the interface does is the maintainer's call, and a primitive +6. **Upstream for behaviour; the look is Tcode's own.** gpui-base and + gpui-kit are the infrastructure for behaviour. Everything they provide on + top of GPUI — selection, scrolling, positioning, dismissal, focus, motion, + virtual lists, form controls — is used as it is before anything of the + kind is written in Tcode, and Tcode never re-derives a primitive's rules + locally. Where gpui-base demonstrably cannot meet the need, Tcode builds + what is missing — a primitive reimplemented, a behaviour default + overridden, or an element gpui-base does not have — and the site names + that gap; it is removed once gpui-base closes it. How the interface looks + is Tcode's to design and develop, not gpui-base's defaults: its type + scale, spacing, radii, elevation, colours and motion timing, the + components it composes from those primitives, and which form each kind of + information takes. Tcode gives gpui-base's theme tokens its own values so + upstream components follow them, rather than restyling each use. What the + interface does and how it looks is the maintainer's call, and a primitive gpui-base lacks is never a reason to leave an effect out, make it instant, or settle for less. From 4e1c2e7372e9ef1c0b631a3d042f515cd3e527f0 Mon Sep 17 00:00:00 2001 From: Tryanks Date: Mon, 23 Nov 2026 05:44:43 +0800 Subject: [PATCH 02/12] Visualize: pass pages inline, keep path for script-written large files The description offered `path` as a peer of `html` "for a very long page", though both take the same 512 KB. It now says a page is passed inline, that `path` is only for a page a script already wrote and that is over about 100 KB, and what a path costs: every device reads the file from the host each time it shows the visual. --- crates/visualize-mcp/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/visualize-mcp/src/lib.rs b/crates/visualize-mcp/src/lib.rs index f5f0b29b7..5b1f753d2 100644 --- a/crates/visualize-mcp/src/lib.rs +++ b/crates/visualize-mcp/src/lib.rs @@ -21,14 +21,14 @@ pub struct VisualizeInput { /// Short name of the visual. It is not drawn with the page; it names the call where the /// page cannot be shown. pub title: String, - /// Self-contained static HTML fragment with optional `