Skip to content

fix(ux): stabilize explore mode toggle visuals in extraction overlay#931

Merged
cpcloud merged 5 commits intomicasa-dev:mainfrom
cpcloud:worktree-agent-af040029
Apr 18, 2026
Merged

fix(ux): stabilize explore mode toggle visuals in extraction overlay#931
cpcloud merged 5 commits intomicasa-dev:mainfrom
cpcloud:worktree-agent-af040029

Conversation

@cpcloud
Copy link
Copy Markdown
Collaborator

@cpcloud cpcloud commented Apr 14, 2026

Summary

  • Hint bar stability: a/x/esc now always appear as trailing group in both pipeline and explore modes — mode-specific hints precede them
  • Overlay height stability: stablePreviewLines() reserves height from tallest tab across all preview groups, padding shorter tabs with newlines
  • Tab persistence: exiting explore mode preserves last-viewed preview tab instead of resetting to tab 0
  • Edge case: unknown-table ops (empty preview groups) fall back to rendered line count

Reproduction steps

  1. Open extraction overlay on a document with preview data
  2. Note position of a/x/esc in hint bar and overlay height
  3. Press x to toggle explore mode
  4. Before fix: hint bar jumps (x key moves), overlay height changes
  5. After fix: hint bar stable, overlay height unchanged, tab preserved

Changes

  • internal/app/extraction_render.go — hint bar reorder, stablePreviewLines(), tab persistence, unknown-table fallback
  • internal/app/extraction_test.go — 5 new tests covering all fix behaviors

Closes #892

🤖 Generated with Claude Code

@cpcloud cpcloud added bug Something isn't working ux User experience labels Apr 14, 2026
@cpcloud cpcloud force-pushed the worktree-agent-af040029 branch 2 times, most recently from d09f00b to ab9b77f Compare April 18, 2026 10:00
cpcloud and others added 5 commits April 18, 2026 06:02
Root cause analysis and implementation plan for the two visual
glitches when toggling explore mode: hint bar key jumping and
overlay height changes from varying preview tab row counts.

closes micasa-dev#892
Three fixes for visual jumping when toggling explore mode (micasa-dev#892):

1. Reorder pipeline-mode hints so a/x/esc are always the trailing
   three items, matching explore mode. Mode-specific hints (enter,
   t/layout) come before the stable tail.

2. Compute preview line reservation from the tallest tab's row count
   and pad the rendered section to that height, preventing the overlay
   from shrinking when switching between tabs with different row counts.

3. Use ex.previewTab in both modes instead of resetting to tab 0 in
   pipeline mode, maintaining visual continuity across toggle.

closes micasa-dev#892
When all operations target unknown tables, groupOperationsByTable
returns empty groups but hasOps is true. Fall back to rendered section
line count instead of returning 0 from stablePreviewLines, preserving
overlay sizing behavior for this edge case.
- Replace string concat loop with strings.Repeat (perfsprint)
- Use require.Positive/assert.Positive instead of Greater(x, 0) (testifylint)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cpcloud cpcloud force-pushed the worktree-agent-af040029 branch 2 times, most recently from f31356f to 77f304e Compare April 18, 2026 10:41
@cpcloud cpcloud merged commit e92499d into micasa-dev:main Apr 18, 2026
55 checks passed
@cpcloud cpcloud deleted the worktree-agent-af040029 branch April 18, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ux User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ux): explore mode toggle causes jumpy x key and overlay height change

1 participant