Skip to content

fix(editor): highlight selected Markdown table cells - #37624

Merged
AmoabaKelvin merged 1 commit into
mainfrom
highlight-markdown-table-cells
Nov 3, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
highlight-markdown-table-cells

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12

ELI5

Selected Markdown table cells now show a visible fill, so you can see the rectangle you are about to copy or edit.

What Changed

The shared rich Markdown stylesheet now paints ProseMirror's existing .selectedCell decoration with a translucent --foreground fill. Each cell bounds its own overlay, which lets pointer input pass through and keeps header and striped-row backgrounds beneath it.

Why

ProseMirror already selected and copied the right cells, but Orca had no style for the selection class. Styling that shared owner fixes file editors, GitHub composers, and Linear descriptions without changing selection or Find behavior.

Linked Issue

Fixes STA-13408.

Visual Proof

Real RichMarkdownEditor component, headless Chromium on macOS, 1280 × 900 viewport. Click the Name header, then Shift-click In progress to select two columns across the header and two body rows. The six selected cells, document contents, and exact plain-text/HTML copy are identical before and after.

Theme Before After
Light Before, light After, light
Dark Before, dark After, dark

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Headless fixture validation exercised real click/Shift-click selection of six header/body cells in light and dark, exact plain-text and HTML copy, unchanged document content, and clearing selection by clicking outside the table. Selected cell bounds match the baseline, and stock-theme header/body text contrast remains at least 9:1.

rich-markdown-table-actions.test.ts: 22 passed with ORCA_BACKGROUND_LAUNCH=1 and --maxWorkers=2. Changed-file formatting, changed-code quality, React Doctor, and git diff --check passed. No new source-text CSS test was added because it would not prove the visible fill; before/after rendered checks cover this presentation-only fix. CI covers broad platform checks; no native Windows/Linux, SSH app, or mobile runtime check was run locally.

Risk

Level: Low

The risk is selection tint or layering on rich content inside table cells. The overlay stays inside each selected cell and ignores pointer events; selection, copying, saved content, and host protocols do not change. A plain revert removes the fill with no data migration.

AI Disclosure

Review

Exactly two rounds, each with independent Codex and Claude reviewers, against HEAD/merge-base aaf4a5d9539adda2c3c6dddcbf28f7083c444805 and this unchanged CSS diff. Both reviewers returned no findings in both rounds; no accepted or refuted findings remain. The reviews checked decoration producers, rich-content containing blocks, header/stripe paint, table-control layering, theme tokens, clipboard serialization, and sibling routes.

pnpm check:changed --maxWorkers=2: all 21 selected checks passed. Final test-audit and simplification passes left the CSS-only fix unchanged.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Shared renderer CSS applies across local/remote and folder/worktree editors. Mobile uses a separate editor without ProseMirror cell selection and is unchanged. The Find work in #35764 remains untouched. No new strings, shortcuts, dependencies, IPC, or persisted state.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The stylesheet now positions Tiptap-selected table cells and adds a full-inset pseudo-element overlay with a translucent foreground tint. The overlay does not intercept pointer events.

Merge Risk: Minimal · up to 5afea

The change is limited to visual table-cell selection styling and is ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "fix(editor): highlight selected Markdown table cells" matches the single change in the changeset. The PR adds CSS in rich-markdown-editor.css that paints ProseMirror's existing .selectedCel…
Description check Passed The description follows the repository template and fills in most required sections. It includes ELI5, What Changed, Why, a linked issue (STA-13408), Visual Proof with before and after images in light…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Title check

Explanation

The title "fix(editor): highlight selected Markdown table cells" matches the single change in the changeset. The PR adds CSS in rich-markdown-editor.css that paints ProseMirror's existing .selectedCell decoration with a translucent fill. The title is concise, specific, and follows a conventional commit style. It names the affected area (editor) and the visible effect (highlighting selected Markdown table cells).

Full details: Description check

Explanation

The description follows the repository template and fills in most required sections. It includes ELI5, What Changed, Why, a linked issue (STA-13408), Visual Proof with before and after images in light and dark themes, Testing with specific test results, Risk with level Low and a revert note, Review, Notes, and Checklist. The mechanism, user-facing before and after, and alternatives are described. Gaps: the Risk section does not explicitly name the rollback path beyond a plain revert (it does state one), the AI Disclosure section is empty (it applies only to non-StablyAI members, so this is acceptable), and the final checklist item for pnpm lint, typecheck, test, and build is unchecked. The description also lists a 'Fixes' link in the Linked Issue section, which is filled in. The Linked Issue section contains a Linear link rather than a GitHub issue reference, which the template does not forbid. The description is mostly complete, so it passes.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 021bccbc-f0aa-4c89-b0b6-36a3fd6a704d
Commits

Reviewing files that changed from the base of the PR and between aaf4a5d and 5afea3d.

Files selected for processing: 1
  • src/renderer/src/assets/rich-markdown-editor.css

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AmoabaKelvin
AmoabaKelvin merged commit 35accd2 into main Nov 3, 2026
41 checks passed
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