Gap
The defect fixed in #432 was that ChatView never told the context strip about the capacity readout, so the strip collapsed on a non-Git project and took a live reading with it.
That PR's tests cover the two pure functions on either side of the gap:
shouldShowComposerContextStrip — does the right thing given hasCapacityReading
hasComposerUsageContent — reports whether there is a reading
Neither covers the wiring between them, which is where the bug actually lived. Replacing hasCapacityReading: composerUsageHasContent with false at ChatView.tsx:5484 and :5491 restores the original bug, and the entire suite still passes.
Suggested approach
apps/web/src/components/ChatView.logic.test.ts already exists as a home for ChatView-level derivations. Extracting the strip-input assembly into a pure function there — inputs to { mount, show } — would make the regression catchable. A rendering test asserting the strip stays visible for a non-Git project with a reading would also do it.
Worth pairing with #436, since a design that removes the parent-side enumeration would change what needs testing here.
Notes
Raised during review of #432; left out to keep that PR to one concern.
Gap
The defect fixed in #432 was that
ChatViewnever told the context strip about the capacity readout, so the strip collapsed on a non-Git project and took a live reading with it.That PR's tests cover the two pure functions on either side of the gap:
shouldShowComposerContextStrip— does the right thing givenhasCapacityReadinghasComposerUsageContent— reports whether there is a readingNeither covers the wiring between them, which is where the bug actually lived. Replacing
hasCapacityReading: composerUsageHasContentwithfalseatChatView.tsx:5484and:5491restores the original bug, and the entire suite still passes.Suggested approach
apps/web/src/components/ChatView.logic.test.tsalready exists as a home for ChatView-level derivations. Extracting the strip-input assembly into a pure function there — inputs to{ mount, show }— would make the regression catchable. A rendering test asserting the strip stays visible for a non-Git project with a reading would also do it.Worth pairing with #436, since a design that removes the parent-side enumeration would change what needs testing here.
Notes
Raised during review of #432; left out to keep that PR to one concern.