compaction: not viewable — the dividers stay, inert (release polish 4)
Owner ruling (release polish round, 2026-10-06): the compaction summary dialog is gone. The content is model-facing plumbing — anyone who wants to inspect it reads their provider logs. Both dividers survive as INERT markers: the moment divider's 'Context compacted' note and the cut divider's 'HISTORY COMPACTED · 152k tok' seam chip render as plain text; no button, no dialog, no state. The marker parts and the server fold are untouched — this is a pure render-side removal. Pins: dividers render without <button> or cursor affordances, and the marker's summary text never reaches the DOM. 1427 tests, tsc, lint, build green.
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
/**
|
||||
* THE COMPACTION DIVIDERS — SSR render pins (owner round 14). Two ruled
|
||||
* surfaces from one marker: the MOMENT divider (minimal centered small
|
||||
* text, the retrying-message register — no rule lines) where the user
|
||||
* is when compaction lands, and the CUT divider (the longer one —
|
||||
* phase-divider geometry, dotted rules + a chip carrying the summarized
|
||||
* token count) at the kept boundary. Both open the same summary dialog
|
||||
* (the marker's full model-facing content, verbatim, scrollable).
|
||||
* THE COMPACTION DIVIDERS — SSR render pins (owner round 14; inert since
|
||||
* release polish 2026-10-06). Two ruled surfaces from one marker: the
|
||||
* MOMENT divider (minimal centered small text, the retrying-message
|
||||
* register — no rule lines) where the user is when compaction lands, and
|
||||
* the CUT divider (the longer one — phase-divider geometry, dotted rules
|
||||
* + a chip carrying the summarized token count) at the kept boundary.
|
||||
*
|
||||
* The dialog portals to document.body at z-50; SSR renders null when
|
||||
* closed — the pins hold the open state through a jsdom-free server
|
||||
* render (createPortal is a no-op passthrough on the server).
|
||||
* NOT VIEWABLE (owner, 2026-10-06): the summary dialog is gone — the
|
||||
* compaction content is model-facing plumbing; anyone who wants to
|
||||
* inspect it reads their provider logs. The pins below hold the
|
||||
* dividers INERT: plain markup, no button, no affordance, and the
|
||||
* marker's summary text never reaches the DOM.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
@@ -21,8 +22,6 @@ import { describe, it } from "node:test";
|
||||
import {
|
||||
CompactionCutDivider,
|
||||
CompactionMomentDivider,
|
||||
CompactionSummaryBody,
|
||||
CompactionSummaryDialog,
|
||||
type CompactionDividerData,
|
||||
} from "../components/compaction-divider.tsx";
|
||||
|
||||
@@ -35,9 +34,11 @@ const data: CompactionDividerData = {
|
||||
},
|
||||
};
|
||||
|
||||
const INERT = ["no click affordance survives the 2026-10-06 ruling"];
|
||||
|
||||
describe("CompactionMomentDivider", () => {
|
||||
it("renders the minimal centered note — no rule lines, retrying-message register", () => {
|
||||
const html = renderToStaticMarkup(<CompactionMomentDivider data={data} onOpen={() => {}} />);
|
||||
const html = renderToStaticMarkup(<CompactionMomentDivider data={data} />);
|
||||
assert.ok(html.includes('data-testid="compaction-divider"'));
|
||||
assert.ok(html.includes("Context compacted"));
|
||||
// NO horizontal rule (the owner ruling: minimal, unlike the cut)
|
||||
@@ -47,7 +48,7 @@ describe("CompactionMomentDivider", () => {
|
||||
|
||||
describe("CompactionCutDivider", () => {
|
||||
it("renders the longer seam — dotted rules + chip with the token count", () => {
|
||||
const html = renderToStaticMarkup(<CompactionCutDivider data={data} onOpen={() => {}} />);
|
||||
const html = renderToStaticMarkup(<CompactionCutDivider data={data} />);
|
||||
assert.ok(html.includes('data-testid="compaction-cut-divider"'));
|
||||
assert.ok(html.includes("border-t-2 border-dotted"));
|
||||
assert.ok(html.includes("History compacted"));
|
||||
@@ -56,17 +57,24 @@ describe("CompactionCutDivider", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("CompactionSummaryDialog", () => {
|
||||
it("renders the marker content verbatim, scrollable (the pure body — portals need document)", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<CompactionSummaryBody summary={data} onClose={() => {}} />,
|
||||
);
|
||||
assert.ok(html.includes('data-testid="compaction-summary-dialog"'));
|
||||
assert.ok(html.includes("[SESSION HISTORY COMPACTED]"));
|
||||
assert.ok(html.includes("overflow-y-auto"));
|
||||
assert.ok(html.includes('data-testid="compaction-summary-close"'));
|
||||
describe("not viewable (owner, release polish 2026-10-06)", () => {
|
||||
it("neither divider is a button — plain markup, no click affordance", () => {
|
||||
for (const html of [
|
||||
renderToStaticMarkup(<CompactionMomentDivider data={data} />),
|
||||
renderToStaticMarkup(<CompactionCutDivider data={data} />),
|
||||
]) {
|
||||
assert.ok(!html.includes("<button"), INERT[0]);
|
||||
assert.ok(!html.includes("cursor-pointer"), INERT[0]);
|
||||
}
|
||||
});
|
||||
it("renders nothing when closed", () => {
|
||||
assert.equal(renderToStaticMarkup(<CompactionSummaryDialog summary={null} onClose={() => {}} />), "");
|
||||
|
||||
it("the marker's summary text never reaches the DOM — provider logs are the inspection path", () => {
|
||||
for (const html of [
|
||||
renderToStaticMarkup(<CompactionMomentDivider data={data} />),
|
||||
renderToStaticMarkup(<CompactionCutDivider data={data} />),
|
||||
]) {
|
||||
assert.ok(!html.includes("[SESSION HISTORY COMPACTED]"), "the header stays out");
|
||||
assert.ok(!html.includes("THE LEARNER"), "the summary stays out");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user