Skip to content

fix(desktop): make NewProjectModal error text selectable#4036

Merged
Kitenite merged 1 commit into
mainfrom
modal-error-selectable-2
May 4, 2026
Merged

fix(desktop): make NewProjectModal error text selectable#4036
Kitenite merged 1 commit into
mainfrom
modal-error-selectable-2

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented May 4, 2026

Summary

  • Global user-select: none on body prevented copying error messages from the New Project modal — the text users most need to share when reporting issues.
  • Add select-text to the error span so the message can be selected and copied.

Test plan

  • Open New Project modal, trigger an error (e.g. invalid URL), select and copy the error text

Summary by cubic

Make error text in the New Project modal selectable so users can copy it. This overrides the global user-select: none that prevented copying error messages for bug reports.

Written for commit 4a451b7. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Error messages are now selectable, allowing users to easily copy and share error text when needed.

The renderer applies user-select: none globally on body, which
prevented copying error messages out of the New Project modal —
exactly the text users want to share when reporting issues.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 14dd3fee-689d-4147-ac9d-52f389e8f3d8

📥 Commits

Reviewing files that changed from the base of the PR and between c088df1 and 4a451b7.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/AddRepositoryModals/components/NewProjectModal/NewProjectModal.tsx

📝 Walkthrough

Walkthrough

A single line in an error message component was updated to include the select-text CSS class, allowing displayed error text to be selectable by users. No functional logic, state handling, or control flow was altered.

Changes

Error Message Selectability

Layer / File(s) Summary
UI Enhancement
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/AddRepositoryModals/components/NewProjectModal/NewProjectModal.tsx
Error message <span> element now includes the select-text class to enable text selection for better UX when copying error details.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A whisker twitch of CSS delight,
One class applied, the error text takes flight—
Now users can select and copy with ease,
A small change that aims to please. ✨

🚥 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 clearly and concisely describes the main change: making error text selectable in the NewProjectModal component.
Description check ✅ Passed The description provides clear context (global user-select conflict) and the solution (adding select-text class), with a test plan, though it deviates from the template structure.
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.

✏️ 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 modal-error-selectable-2

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
Review rate limit: 4/8 reviews remaining, refill in 26 minutes and 25 seconds.

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

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR adds the select-text Tailwind class to the error <span> inside NewProjectModal, overriding the global user-select: none on body so users can select and copy error messages. The change is targeted, minimal, and correct.

Confidence Score: 5/5

Safe to merge — single-class CSS fix with no logic changes or side effects.

The change is a one-line Tailwind class addition that correctly overrides the global user-select policy on a specific UI element. No logic, state, or API surface is affected.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/AddRepositoryModals/components/NewProjectModal/NewProjectModal.tsx Added select-text Tailwind class to error span to allow text selection — straightforward one-class fix with no logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User triggers error in NewProjectModal] --> B{error state set?}
    B -- Yes --> C[Render error div]
    C --> D["<span class='select-text'>error message</span>"]
    D --> E[User can select & copy text]
    B -- No --> F[No error UI rendered]
Loading

Reviews (1): Last reviewed commit: "fix(desktop): make NewProjectModal error..." | Re-trigger Greptile

@Kitenite Kitenite merged commit d49017b into main May 4, 2026
7 of 8 checks passed
@Kitenite Kitenite deleted the modal-error-selectable-2 branch May 4, 2026 08:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

MocA-Love pushed a commit to MocA-Love/superset that referenced this pull request May 21, 2026
…#4036)

The renderer applies user-select: none globally on body, which
prevented copying error messages out of the New Project modal —
exactly the text users want to share when reporting issues.
MocA-Love added a commit to MocA-Love/superset that referenced this pull request May 25, 2026
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