Skip to content

feat(extensions): cap pane size responsively - #1091

Draft
benvinegar wants to merge 1 commit into
mainfrom
feat/pane-max-fraction-v26
Draft

feat(extensions): cap pane size responsively#1091
benvinegar wants to merge 1 commit into
mainfrom
feat/pane-max-fraction-v26

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Problem

Extension panes can use a responsive preferred fraction, but their maximum size is fixed in terminal cells. A pane that should stay subordinate to the review can therefore consume too much space on smaller terminals or after a resize.

Approach

  • add ExtensionPaneSize.maxFraction in extension API v26
  • cap both planned geometry and divider dragging against the host body axis
  • apply the tighter of max, maxFraction, and review minimum-space constraints
  • retain capped manual overrides across later terminal growth
  • document and package-check the public contract

This is deliberately an extension pane sizing primitive, not a new built-in pane policy.

Verification

  • bun test packages/hunk/src/extensions/runExtension.test.ts packages/hunk/src/ui/lib/extensionPanes.test.ts packages/hunk/src/ui/hooks/useExtensionPaneController.test.tsx (87 passed)
  • bun test test/pty/extensions-integration.test.ts (21 passed)
  • bun run typecheck
  • bun run lint
  • bun run format:check
  • bun run check:docs
  • bun run deps:check
  • bun run build:npm && bun run check:pack
  • bun run changeset:status
  • bun run test (2,198 passed, 3 skipped, 1 unrelated failure in packages/hunk/src/lib/shikiWasm.test.ts; reproduced unchanged on origin/main)

Evidence

No visual capture yet; this is opened as a draft while deciding whether to keep the API.

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hunk-web Ready Ready Preview Sep 10, 2026 1:22pm UTC

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant