Conversation
|
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)
📝 WalkthroughWalkthroughRefactors clipboard copy logic in two UI components to perform a capability check, add shared helper functions (updateFeedback, resetFeedback, fallbackCopy), unify feedback handling, and provide a textarea+execCommand fallback. Adds Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 098a81024f
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs/src/components/doc/CopyPage.astro`:
- Around line 202-208: The copy handler currently uses
navigator.clipboard.writeText(content) and only logs success, but needs an
aria-live status region for screen readers: add a visually-hidden element in the
component markup with role="status" and aria-live="polite" (e.g., a status DOM
node or state variable bound to text), then update that element's text to a
clear success or error message inside the copy routine (on success and in the
catch branch where you throw or handle 'Clipboard API unavailable') instead of
only console.log so assistive tech receives the announcement; reference the
existing navigator.clipboard.writeText call and the content variable when wiring
the updates.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d2506670-d2f8-4f0f-8cca-c83d97544f5a
📒 Files selected for processing (3)
apps/docs/src/components/doc/CopyPage.astroapps/web/src/content.config.tsapps/web/src/pages/tools/ios-udid-finder/result.astro
098a810 to
b952889
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/docs/src/components/doc/CopyPage.astro (1)
181-188: Avoid overlapping feedback reset timers.Line 182 schedules a new timeout per copy without cancelling prior ones; rapid repeated copies can clear a newer status early. Keep one timer per button and clear it before scheduling a new reset.
Suggested patch
document.querySelectorAll('.copy-markdown').forEach((btn) => { + let resetTimer btn.addEventListener('click', async (e) => { @@ function resetFeedback() { + if (resetTimer) window.clearTimeout(resetTimer) - window.setTimeout(() => { + resetTimer = window.setTimeout(() => { if (title) { title.textContent = originalText || translations.copyPage } updateFeedback('') }, 2000) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/components/doc/CopyPage.astro` around lines 181 - 188, The resetFeedback function schedules timeouts per copy but never cancels previous ones, causing newer feedback to be cleared early; modify the component to store a single timer id (e.g., feedbackTimeoutId) scoped to the button/component, call clearTimeout(feedbackTimeoutId) before scheduling a new window.setTimeout in resetFeedback, then assign the new id so only one pending reset exists; keep using title.textContent (with originalText || translations.copyPage) and updateFeedback('') inside the timeout.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs/src/components/doc/CopyPage.astro`:
- Around line 190-207: Remove the legacy fallbackCopy function and its use:
delete the function named fallbackCopy and any code that calls or relies on
Reflect.get(document, 'execCommand') and the textarea-based fallback; instead,
call navigator.clipboard.writeText(value) directly where copying is needed
(e.g., in the copy handler that previously invoked fallbackCopy) and throw an
error if navigator.clipboard or navigator.clipboard.writeText is unavailable or
the promise rejects, ensuring you surface that error to the caller/UI.
---
Nitpick comments:
In `@apps/docs/src/components/doc/CopyPage.astro`:
- Around line 181-188: The resetFeedback function schedules timeouts per copy
but never cancels previous ones, causing newer feedback to be cleared early;
modify the component to store a single timer id (e.g., feedbackTimeoutId) scoped
to the button/component, call clearTimeout(feedbackTimeoutId) before scheduling
a new window.setTimeout in resetFeedback, then assign the new id so only one
pending reset exists; keep using title.textContent (with originalText ||
translations.copyPage) and updateFeedback('') inside the timeout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9dfece40-afe1-44fb-b91c-f671b6d28888
📒 Files selected for processing (2)
apps/docs/src/components/doc/CopyPage.astroapps/web/src/pages/tools/ios-udid-finder/result.astro
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/web/src/pages/tools/ios-udid-finder/result.astro
|



Summary
astro/zodsoapps/web/src/content.config.tsno longer relies on the deprecatedzre-exportdocument.execCommand('copy')clipboard fallbacks from the web UDID tool page and the docs copy-page componentindexparameter in the UDID result page callback surfaced during Astro checkingRoot cause
Astro 6.1.3 now marks the
zexport fromastro:contentas deprecated, and the copy helpers still used the deprecated DOMexecCommand('copy')fallback.Impact
This clears the TypeScript deprecation warnings from both
apps/webandapps/docswithout changing the visible copy interactions when the Clipboard API is available.Validation
bun run checkSummary by CodeRabbit
Refactor
Accessibility
Behavior Changes