Skip to content

Add Copy path beside Copy in mobile Markdown footer - #32748

Merged
AmethystLiang merged 1 commit into
mainfrom
markdown-add-copy-path-at-bottom
Oct 23, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
markdown-add-copy-path-at-bottom

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Copy a Markdown file's path directly from the bottom of the mobile editor, beside the existing Copy button.

What Changed

Adds Copy path immediately to the right of Copy in the mobile Markdown footer. It copies the workspace-relative path, falling back to the host file path. The footer and Markdown tab menu now share the existing path-copy behavior, including success and failure feedback. Copy continues to copy the current draft.

Why

The path was available only in the tab menu. Exposing the same action beside Copy makes it easier to paste a file reference while reading or editing. Reusing the action avoids separate clipboard and path-selection behavior.

Linked Issue

Requested directly by a maintainer; no pre-existing issue.

Visual Proof

Before (user-provided iPhone screenshot):

Before: only Copy in the footer

After (full shipped mobile session route rendered in hidden Electron with fixture host data):

After: Copy path beside Copy

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

All 294 mobile session test files passed (2,770 tests); the two subsequently added truncated-document and path-switch cases also passed in the focused 12-test rerun. Mobile app typecheck, changed-code quality gate, and mobile test typecheck ratchet passed; no new failures beyond the existing test baseline.

On macOS, rendered the full shipped mobile session route and rich Markdown editor in a hidden Electron window via Playwright CDP, using fixture host data. Clicked Copy path and verified the clipboard bridge received docs/mobile-content-search.md; no page faults or console errors. Checked 390 px and 320 px widths, including an unsaved draft with Discard and Save. Physical iOS/Android device validation was not performed.

Review

Self-reviewed clipboard failure handling, current-tab selection, Windows path fallback, remote/folder workspace behavior, accessibility labels, and footer layout. CodeRabbit reported no actionable code findings.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source or other skill material is copied or translated.

Notes

No new RPC, server capability, dependency, or path normalization. The action uses the existing mobile clipboard abstraction and tab metadata, including remote and folder workspaces. No new effects or background work.

Checklist

  • This PR is small and focused
  • What changed and why are explained above
  • Before/after screenshots attached
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Applicable local lint, typecheck, tests, and bundle rendering passed; CI covers the required checks

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ 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: a90200be-401f-4441-8eab-9f55653fa28e
📥 Commits

Reviewing files that changed from the base of the PR and between 0aed494 and 7f7e3dd.

📒 Files selected for processing: 6
  • mobile/src/session/MobileSessionActiveContent.tsx
  • mobile/src/session/MobileSessionMarkdownReader.test.tsx
  • mobile/src/session/MobileSessionMarkdownReader.tsx
  • mobile/src/session/MobileSessionSheets.tsx
  • mobile/src/session/session-markdown-source-copy.test.tsx
  • mobile/src/session/use-mobile-session-markdown-actions.ts

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

📝 Walkthrough

The session action now copies a Markdown tab’s relative path, or its file path when the relative path is empty. It reports success or failure through toast messages and error haptics. The Markdown reader adds a Copy path button connected to the active tab. The session sheet delegates its Copy Path action to the same session action. Tests cover path selection, feedback, tab switching, and reader button states.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 7f7e3

No merge-blocking issue is established for the Copy path change; it is ready for normal merge checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description covers the user impact, implementation, rationale, visual proof, testing, review notes, and checklist. The required Linked Issue section does not contain an actual issue link; it only … Add the actual linked issue under "Fixes #" or provide repository-approved maintainer confirmation that this change qualifies for the template's no-new-issue exception and reference any existing issue if one exists.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly describes the primary user-facing change: adding a Copy path action beside Copy in the mobile Markdown footer.
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: Description check

Explanation

The description covers the user impact, implementation, rationale, visual proof, testing, review notes, and checklist. The required Linked Issue section does not contain an actual issue link; it only states that a maintainer requested the change.

Resolution

Add the actual linked issue under "Fixes #" or provide repository-approved maintainer confirmation that this change qualifies for the template's no-new-issue exception and reference any existing issue if one exists.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@AmethystLiang
AmethystLiang merged commit ffd3d33 into main Oct 23, 2026
39 of 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