Keep the last prompt sticky at the top of the transcript - #12
Draft
felipeorlando wants to merge 1 commit into
Draft
felipeorlando wants to merge 1 commit into
felipeorlando wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9
The prompt now stays pinned to the top of the transcript while its reply scrolls underneath, until the next prompt takes its place. Extends the existing Anchor prompts to top setting — no new setting.
content-visibility: auto+contain-intrinsic-block-sizemoved off.transcript-turnonto a new.transcript-turn-body. The paint containment implied bycontent-visibilitywas making any sticky descendant stick to the turn's own box — a no-op. The wrapper is now the sticky travel track; virtualization is preserved on the body, so the 0.1.35 transcript fold keeps every tool row mounted — project switching stays laggy on long sessions (still in 0.1.36) hardbeat920/monocode#107 property stays intact.role === "user"item is pulled out as a direct child row of.transcript-turnwithsticky top-0, only when the toggle is on.IntersectionObserverper user message (root = scrollerEl,rootMargin: "-1px 0px 0px 0px",threshold: 1), matching the existing per-messageResizeObservercost. Stuck:line-clamp-1, opaque surface, subtle bottom border.Two deviations from the issue text, both deliberate
zIndexmoved.zIndex: stickyIndexwas applied to the bubble, which isposition: staticin the document layout — z-index there does nothing for sticky stacking between turns. The same ascending value now sits on the sticky row itself, the element that actually stacks, and the deadstickyIndexprop was dropped fromTranscriptBlock/UserMessageBlock.entry.boundingClientRect.top <= entry.rootBounds.top.bg-content/10— only a full-width bar blocks text scrolling past in the padding gaps. The bubble's tint composites over it and stays right-aligned in chat layout.Verification
npm run check:web— exit 0, 127 files / 1327 tests. 4 new tests: sticky class present/absent per setting, ascending z-index on consecutive pinned prompts, andcontent-visibilitylanding on.transcript-turn-bodywith no.transcript-turnrule.NOT verified — needs a run of the app
renderToStaticMarkupruns no effects and has no layout, so everything driven by the IntersectionObserver is untested: whether the prompt actually pins, the stuck→released transition, the one-line opaque bar, the top-edge guard, the handoff where the next prompt pushes the previous one out and the z-index ordering during that overlap, the bar's appearance under native glass, and whethercontain-intrinsic-block-sizeon the body alone causes scroll jumps on long transcripts.