Port · Parity: every page matches gpui 0.2.2's; the rules re-tested

Every page and scripted state was shot with gpui 0.2.2 and with the
port, light and dark, full width and at 280px, judged pair by pair by
agents with skeptics, and every page's log diffed. What differed is
fixed, each with a test that fails without it where the test platform
can show it:

- The gallery's harness takes posted mouse moves (gpui_macos listens
  to a tracking area), posts each drag move twice (it no longer
  replays a held drag), and waits three frames before each shot.
- Rolling digits: a block column, so taffy 0.13 lends the cell no
  baseline, and a line of whole device pixels, since gpui snaps each
  length on its own. DescriptionList's row aligns ends.
- Margins that taffy 0.13 collapses through a plain block: the
  drawer's pull and snap, the stagger and transition rise, the dialog
  and palette rises, the fullscreen dialog's slide.
- An Input keeps room to type in a squeezed row; the field rows drop
  w_full, whose reason was taffy 0.9's.

AGENTS.md's rules that named gpui 0.2.2 or taffy 0.9 were re-tested
against both sources and rewritten, and new ones say what the port
changed. TASKS.md's tags follow: what the new gpui makes possible is
prove. Captions, doc comments and README say what holds now.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-29 10:39:55 -04:00
1 parent 3189df013f
commit 3f1597fa28
44 files changed
+535 -138

No files matched your search

+29 -2
View File
@@ -7,8 +7,8 @@ use gpui::{
use jiff::Timestamp;
use crate::finance::{
CandlestickChart, ChartSync, DepthChart, Leg, MarketHeatmap, PayoffDiagram, PointFigureChart,
RenkoChart, candles::Candle, stage::Visible,
CandlestickChart, ChartSync, CurrencyConverter, DepthChart, Leg, MarketHeatmap, PayoffDiagram,
PointFigureChart, RenkoChart, candles::Candle, stage::Visible,
};
use crate::{layout::tests::narrow_width, theme::Theme};
@@ -147,3 +147,30 @@ fn every_chart_fills_a_column_its_block_measures_by_content(cx: &mut TestAppCont
"each chart spans the card inside its padding"
);
}
/// A converter in a 460px box beside a card 260 wide, in a 280px row.
struct Squeezed;
impl Render for Squeezed {
fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
let converter = CurrencyConverter::new("converter", 1000.0, ("USD", "EUR"), 0.9174);
div().w(px(280.)).child(
div()
.flex()
.gap_8()
.child(div().w(px(460.)).child(converter))
.child(div().flex_1().child(div().w(px(260.)).h(px(100.)))),
)
}
}
#[gpui::test]
fn a_squeezed_converter_keeps_room_for_its_currencies(cx: &mut TestAppContext) {
cx.update(Theme::init);
let (_, cx) = cx.add_window_view(|_, _| Squeezed);
cx.run_until_parked();
let text = cx
.debug_bounds("input-text")
.expect("the second currency's text");
assert_eq!(text.size.width, px(26.), "the frame's inset for its name");
}