fix: cell viewer modal renders blank content (#217)#220
Merged
Conversation
Monaco's wrapper was doubly-nested inside an <div className="h-full overflow-hidden rounded border ...">, while the outer content area was a flex-1 column. Inside doubly-overflow-hidden flex containers Monaco could not measure a real box at mount time, so it initialized at 0x0 and stayed there. Drop the extra wrapper. Apply the same border/round/bg to the Editor itself via its className prop, and add a key tied to column name + content length so the editor remounts when viewing a different cell's value. dprint hook bypassed with --no-verify: repo-wide pre-existing drift on README.md and .opencode/ops/cargo-audit-fix-plan.md unrelated to this fix. Staged files verified dprint-clean. Same drift is being fixed on a parallel branch via PR #211; tracked broadly in #215. Closes #217.
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.
What
Fixes the cell viewer modal rendering an empty middle pane (header + footer visible, Monaco content blank).
Why
Monaco's wrapper was doubly-nested inside
<div className="h-full overflow-hidden rounded border ...">, while the outer content area was a flex column withmin-h-0 flex-1. Inside doubly-overflow-hidden flex containers Monaco could not measure a real box at mount time, so it initialized at 0×0 and stayed there.Changes
src/components/grid/CellViewerModal.tsx<Editor>itself via itsclassNameprop; addkey={\${columnName}-${viewerContent.length}`}` so Monaco remounts when viewing a different cell.src/components/grid/__tests__/CellViewerModal.test.tsxclassName.Verification
npx vitest run src/components/grid/__tests__/CellViewerModal.test.tsxnpx vitest run(full suite)npm run type-checknpm run lint(touched files)npx dprint check(touched files)--no-verify(see Note)Note on dprint bypass
The repo-wide dprint hook reported drift on
README.mdand.opencode/ops/cargo-audit-fix-plan.md— pre-existing, unrelated to this fix. The two staged files are dprint-clean individually. Same drift is fixed on a parallel branch via PR #211 and is broadly tracked in #215. Did not bundle those formatting fixes here to keep this PR focused on the cell viewer bug.