Fix:Bug: Responsive issue in mid width range when name field is empty and copy to clipboard not working#1573
Conversation
… and copy to clipboard not working
|
| Dimension | Score | What it measures |
|---|---|---|
| Identity | 45 | Account age, contribution history, GPG keys, org memberships |
| Behavior | 90 | PR patterns, unsolicited contribution ratio, activity cadence |
| Content | 100 | PR body substance, issue linkage, contribution quality |
| Graph | 30 | Cross-repo trust, co-contributor relationships |
Analyzed by Brin · Full profile
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRemoved custom clipboard copy methods from the SSO form Stimulus controller and switched callback URL copy buttons to a shared Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ae86d31c0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| data-clipboard-target="source"><%= "#{request.base_url}/auth/#{sso_provider.name.presence || 'PROVIDER_NAME'}/callback" %></code> | ||
| <button type="button" | ||
| data-action="click->admin-sso-form#copyCallback" | ||
| data-action="clipboard#copy" |
There was a problem hiding this comment.
Provide required clipboard icon targets
clipboard#copy now handles these SSO buttons, but this markup only defines data-clipboard-target="source". The shared controller’s showSuccess method unconditionally reads iconDefaultTarget/iconSuccessTarget (app/javascript/controllers/clipboard_controller.js), so clicking this button throws a missing-target error after writeText resolves and falls into the catch path. In practice this produces a false “copy failed” error and no success feedback on every click for the new SSO callback copy UI.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/views/admin/sso_providers/_form.html.erb (1)
93-103:⚠️ Potential issue | 🟠 MajorClipboard controller targets incomplete on both instances—runtime error on successful copy.
Both clipboard instances (lines 93–103 and 177–187) only provide the
sourcetarget. The controller'sshowSuccess()method directly referencesiconDefaultTargetandiconSuccessTargetwithout checking existence, causing a runtime error when copy succeeds.Wrap button icons in spans with the missing targets:
Fix for lines 97–102
<button type="button" data-action="clipboard#copy" class="p-2 text-secondary hover:text-primary shrink-0" title="Copy to clipboard"> + <span data-clipboard-target="iconDefault"> <%= icon "copy", class: "w-4 h-4" %> + </span> + <span data-clipboard-target="iconSuccess" class="hidden"> + <%= icon "check", class: "w-4 h-4" %> + </span> </button>Apply the same fix to the second instance at lines 181–186.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/views/admin/sso_providers/_form.html.erb` around lines 93 - 103, The clipboard controller is missing targets for the button icons used by showSuccess() (it expects iconDefaultTarget and iconSuccessTarget), causing a runtime error; update both instances that currently only set data-clipboard-target="source" (the code block with data-admin-sso-form-target="callbackUrl" and the second similar instance) to include the missing targets by wrapping the copy button's icon markup in elements that provide data-clipboard-target="iconDefault" and data-clipboard-target="iconSuccess" (or the exact target names used by the controller) so showSuccess() can safely find iconDefaultTarget and iconSuccessTarget on success.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@app/views/admin/sso_providers/_form.html.erb`:
- Around line 93-103: The clipboard controller is missing targets for the button
icons used by showSuccess() (it expects iconDefaultTarget and
iconSuccessTarget), causing a runtime error; update both instances that
currently only set data-clipboard-target="source" (the code block with
data-admin-sso-form-target="callbackUrl" and the second similar instance) to
include the missing targets by wrapping the copy button's icon markup in
elements that provide data-clipboard-target="iconDefault" and
data-clipboard-target="iconSuccess" (or the exact target names used by the
controller) so showSuccess() can safely find iconDefaultTarget and
iconSuccessTarget on success.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0a6ce3fe-5ebd-46e8-95b3-8169fdab5075
📒 Files selected for processing (3)
app/javascript/controllers/admin_sso_form_controller.jsapp/views/admin/sso_providers/_form.html.erbapp/views/layouts/settings.html.erb
💤 Files with no reviewable changes (1)
- app/javascript/controllers/admin_sso_form_controller.js
|
@jjmata , waiting to merge |
@jjmata , what is more needed to do on my side to make this pull request merge? |
|
If you start nagging like that every few minutes we might just stop looking ... did you see the Gittensor contribs notice? |

Description
This PR fixes two regressions on Admin -> SSO Providers -> Add SSO Provider (/admin/sso_providers/new) : medium-width responsive clipping and callback URL copy-to-clipboard failure.
Closes #1572
Changes made:
Updated settings layout containers to allow shrinking/wrapping at medium widths (min-w-0, header/action wrap), preventing content clipping when the sidebar is visible.
Hardened callback URL rows in the SSO form with responsive overflow-safe classes (min-w-0, overflow-x-auto, break-all, whitespace-pre-wrap).
Switched SSO callback copy buttons to the shared clipboard Stimulus controller (same pattern as API key copy), instead of custom copy handlers.
Removed custom SSO form copy methods (copyCallback, copySamlCallback) to avoid browser-specific clipboard failures and keep behavior consistent.
Summary by CodeRabbit
New Features
Style