Skip to content

Fix estimated popup vertical alignment#780

Merged
FuJacob merged 1 commit into
mainfrom
codex/fix-overlay-vertical-position
Jul 11, 2026
Merged

Fix estimated popup vertical alignment#780
FuJacob merged 1 commit into
mainfrom
codex/fix-overlay-vertical-position

Conversation

@FuJacob

@FuJacob FuJacob commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Anchor estimated-geometry suggestion popups to the resolver's text-line box instead of the full input-field chrome. This removes the extra one-row drop in tall single-line controls such as Chrome's omnibox while preserving field-bottom placement for multiline AX fallbacks.

Validation

  • swiftlint lint --quiet — exit 0.
  • xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' -derivedDataPath build/DerivedData CODE_SIGNING_ALLOWED=NO buildBUILD SUCCEEDED.
  • xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' -derivedDataPath build/DerivedData CODE_SIGNING_ALLOWED=NO -jobs 1 build-for-testingTEST BUILD SUCCEEDED.
  • xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' -derivedDataPath build/DerivedData CODE_SIGNING_ALLOWED=NO test-without-building -only-testing:CotabbyTests/MirrorOverlayLayoutTestsTEST EXECUTE SUCCEEDED, 20 tests, 0 failures.
  • No post-change runtime screenshot was captured; the pure panel-frame regression tests cover both the reported tall single-line field and the preserved multiline fallback.

Linked issues

None.

Risk / rollout notes

Low-risk presentation-only change. Estimated single-line popup cards move upward to the centered caret line; multiline and full-frame fallbacks keep the previous field-bottom anchor. No settings, schema, project, or runtime changes.

Greptile Summary

This PR adjusts estimated mirror popup placement for text fields. The main changes are:

  • Popup cards now use the estimated caret line when available.
  • Multiline and full-frame fallbacks keep the previous field-bottom placement.
  • Layout tests cover the centered single-line case and multiline fallback case.
  • Related comments were updated to describe the new placement rule.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
Cotabby/Support/MirrorOverlayLayout.swift Updates estimated mirror popup placement to use a non-empty caret line before falling back to the input frame.
CotabbyTests/MirrorOverlayLayoutTests.swift Replaces the old estimated-field placement expectation and adds coverage for the multiline fallback.
Cotabby/Services/UI/OverlayController.swift Updates mirror-mode comments to describe placement under the best available text line.
Cotabby/Support/CompletionRenderModePolicy.swift Updates render-policy comments for estimated geometry and popup placement.

Reviews (1): Last reviewed commit: "Fix estimated popup vertical alignment" | Re-trigger Greptile

@FuJacob FuJacob merged commit 73f74d3 into main Jul 11, 2026
5 checks passed
@FuJacob FuJacob deleted the codex/fix-overlay-vertical-position branch July 11, 2026 00:26
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