Skip to content

Pin docs table grid picker selection at MAX_SIZE on overshoot#203

Merged
hackerwins merged 1 commit into
mainfrom
fix/docs-table-picker-overshoot
May 9, 2026
Merged

Pin docs table grid picker selection at MAX_SIZE on overshoot#203
hackerwins merged 1 commit into
mainfrom
fix/docs-table-picker-overshoot

Conversation

@ggyuchive

@ggyuchive ggyuchive commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

Previously, when the user dragged the table-insert grid picker out past the right or bottom edge, the hover state reset to (-1, -1) and the highlighted region collapsed back to the empty state. This made it impossible to land on the maximum 10x10 selection reliably — a slight overshoot would force the user to re-enter and stop precisely on the last cell.

Now the mouseLeave handler checks the exit edge: if the pointer leaves past the right/bottom of the grid, hover is pinned to the MAX_SIZE-1 boundary on that axis instead of being reset. Leaving via the top or left still resets, since that direction has no selection-overshoot risk.

Why

Linked Issues

Fixes #

Verification

CI automatically posts a verification summary comment on this PR with
per-lane results for both verify:self and verify:integration.

  • verify:self — CI comment shows ✅
  • verify:integration — CI comment shows ✅ (or explicit skip reason below)

Skip reason (if applicable):

Risk Assessment

  • User-facing risk:
  • Data/security risk:
  • Rollback plan:

Notes for Reviewers

  • UI changes (screenshots/gifs if applicable):
  • Follow-up work (if any):

Summary by CodeRabbit

  • Bug Fixes

    • Table grid picker now maintains selection at maximum size (10x10) when pointer exits to the right or bottom edge, preventing unintended state resets.
  • Documentation

    • Updated table UI design documentation with refined grid picker specifications, table cell context menu design, and IME composition event routing details.

Review Change Stack

Previously, when the user dragged the table-insert grid picker out
past the right or bottom edge, the hover state reset to (-1, -1) and
the highlighted region collapsed back to the empty state. This made
it impossible to land on the maximum 10x10 selection reliably — a
slight overshoot would force the user to re-enter and stop precisely
on the last cell.

Now the mouseLeave handler checks the exit edge: if the pointer
leaves past the right/bottom of the grid, hover is pinned to the
MAX_SIZE-1 boundary on that axis instead of being reset. Leaving via
the top or left still resets, since that direction has no
selection-overshoot risk.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR refines the table grid picker interaction model by implementing edge-exit behavior. When the pointer leaves the grid picker on the right or bottom edge at maximum size (10×10), the selection remains pinned instead of resetting, preventing visual snap-back. The design specification documents this behavior, and the implementation detects pointer exits via bounding rect inspection.

Changes

TableGridPicker Edge Exit Behavior

Layer / File(s) Summary
Design Specification
docs/design/docs/docs-table-ui.md
Grid expands from 5×5 up to 10×10. Pointer exit to right/bottom at max size pins selection at 10×10 to prevent overshoot snap-back.
Implementation
packages/frontend/src/app/docs/table-grid-picker.tsx
handleMouseLeave now accepts the mouse event, inspects grid bounding rect, and sets hoverCol/hoverRow to MAX_SIZE - 1 for right/bottom exits; other exits reset to -1.

🐰 A picker grows from five by five,
Up to ten where grids come alive,
When the cursor floats away,
At the edge it loves to stay—
Pinned selection helps it thrive! ✨

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and accurately summarizes the main change: pinning the docs table grid picker selection at MAX_SIZE when the pointer exits past the right or bottom edge (overshoot), which is the core fix described in the PR objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docs-table-picker-overshoot

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Verification: verify:self

Result: ✅ PASS in 140.0s

Lane Status Duration
sheets:build ✅ pass 10.6s
docs:build ✅ pass 9.9s
slides:build ✅ pass 7.5s
verify:fast ✅ pass 75.1s
frontend:build ✅ pass 15.2s
verify:frontend:chunks ✅ pass 0.3s
backend:build ✅ pass 3.9s
cli:build ✅ pass 1.6s
verify:entropy ✅ pass 15.8s

Verification: verify:integration

Result: ✅ PASS

@codecov

codecov Bot commented May 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hackerwins
hackerwins merged commit ca204a2 into main May 9, 2026
4 checks passed
@hackerwins
hackerwins deleted the fix/docs-table-picker-overshoot branch May 9, 2026 22:55
@hackerwins hackerwins mentioned this pull request May 11, 2026
6 tasks
hackerwins added a commit that referenced this pull request May 11, 2026
Adds @wafflebase/slides as a third surface alongside Sheets and Docs,
plus 53-shape library (Phase 1+2), adjustment handles for 9 pilot
shapes (P3-A.1), live snap guides, align/distribute toolbar, themed
authoring, and layout-change UI. Also ships Sheets cell comments
(Phase B), docs peer-avatar caret jump, yorkie-js-sdk 0.7.8 upgrade,
and CLI/REST API improvements (docs export imageFetcher, expired
session refresh, REST docs split). Minor bump because slides is a
new top-level package.

Highlights: #184 #185 #186 #187 #188 #189 #190 #191 #192 #197 #198
#201 #202 #203 #204 #205 #206 #207 #209 #210
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.

2 participants