Skip to content

Commit 2972209

Browse files
j15zclaude
andcommitted
docs(copilot): correct a resume comment the rewind fix left inaccurate
The `unexamined` case claimed "everything read is emitted as text by the caller". That was true when the resume was exactly the window edge, but the straddling-opener rewind holds the last marker's worth of the window back so it can be re-scanned rather than flattened — so the sentence contradicted the paragraph directly beneath it. Nothing is lost either way; the caller emits up to wherever this resumes. Also drops two "Round-N class:" prefixes from test comments. They point at review rounds of this PR, which mean nothing to a reader after it merges; the sentences that follow already say what the bug was. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5066af1 commit 2972209

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ describe('parser properties', () => {
916916
})
917917

918918
it('renders every valid tag as a card whatever surrounds it', () => {
919-
// Round-3 class: a valid tag was flattened to text purely because of how much
919+
// A valid tag was flattened to text purely because of how much
920920
// prose preceded it, which no fixed example set would have found.
921921
for (let seed = 1; seed <= 400; seed++) {
922922
const rng = makeRng(seed)
@@ -943,7 +943,7 @@ describe('parser properties', () => {
943943
})
944944

945945
it('never un-renders a card or retracts text across streamed frames', () => {
946-
// Round-5 class: content already on screen disappeared when a later close
946+
// Content already on screen disappeared when a later close
947947
// arrived. Only visible across frames, never in an end-state assertion.
948948
//
949949
// Text may shrink slightly at a frame edge: a half-arrived opening marker is

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,12 @@ function resumeForClass(cls: BodyClass, bodyStart: number, pastClose: number): n
937937
// Rescan the whole body: nothing was blanked, so no marker is hidden.
938938
return bodyStart
939939
case 'unexamined':
940-
// Resume just short of the first character NOT read. Everything read is
941-
// emitted as text by the caller, and this advances nearly a full window per
942-
// step, so a long body still costs a bounded number of re-entries.
940+
// Resume just short of the first character NOT read: the last marker's
941+
// worth of the window is held back rather than emitted as text, so it is
942+
// re-scanned on the next pass instead of being flattened. Nothing is lost
943+
// — the caller emits up to wherever this resumes. It still advances nearly
944+
// a full window per step, so a long body costs a bounded number of
945+
// re-entries.
943946
//
944947
// The rewind is load-bearing: the window edge is an arbitrary cut, so an
945948
// opener can straddle it. Resuming exactly at the edge leaves that opener's

0 commit comments

Comments
 (0)