Repository navigation
Split the Lens room's 2x2 from its local fit - #72
Merged
Merged
Conversation
…, LensFit the fit, LensFamily takes the fit's running flag and parts
…e section's check and runs it before the fetch check and the sources refresh
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.
The Lens room's 2x2 is now one component both runtimes' source sections can render, and the local fit lives in its own column component that only drowse's native section supplies.
panels/rooms/lens/LensQuad.svelte: the grid (row labels, the S and R columns, the sources error line) and the mount-time source refresh and fetch check. Itscolumnprop picks the column component,LensFamilyby default.panels/rooms/lens/LensFit.svelte: a family column with the local fit. It rendersLensFamilywithfitRunningand afitsnippet whose three parts (status,error,form) LensFamily places where the fit's markup used to be. The fit's state, progress, Replace and form moved here with their scoped styles.LensFamily.sveltetakesfitRunning(disables source switching while a fit runs) and the optionalfitsnippet instead of importinglensFit.lensFetchstays in the stores barrel.panels/JLensSourceSection.svelterenders<LensQuad column={LensFit} />and checks the fit job on mount.drowse.ai's hosted section can then render
LensQuadwith no props. Its build-isolation check refuses the fit's words ("Lens fit progress", "Generation pauses while documents are fitted"), which now appear only inLensFit.svelte.The native room's DOM is unchanged. I compared server renders of the old and new native sections across 12 states (fit idle, running for R or S, cancelling, failed, each with fetch idle, running and failed): with scope classes and hydration comments removed, the output is byte-identical.
Tests (
scripts/lens-room.test.mjs): a walk of LensQuad's SSR import graph reaches LensFamily but neitherinstrumentAuthoringnorLensFit, and no source it reaches carries the fit's markers; LensQuad renders both columns without the fit; the native section shows the fit form per family, the running fit's status (after S's form, with a non-active source disabled), and a failed fit's error.npm run checkandnpm run buildpass; dist rebuilt.