Feat/docs#524
Conversation
…ems added for nuxt content
…ems added for nuxt content
…ems added for nuxt content
…displaying on playground so updated them
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a self-contained Nuxt documentation site for nuxt-auth-utils: app configuration, global styles, UI components, layouts, pages with SEO/OG, extensive content guides (installation, configuration, sessions, OAuth, hashing, WebAuthn, AT Protocol, advanced patterns), and workspace/package updates. ChangesDocumentation Application
Documentation Content
Workspace Configuration
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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.
Actionable comments posted: 9
🧹 Nitpick comments (1)
docs/app/components/UInputCopy.vue (1)
40-40: ⚡ Quick winConsider a dynamic aria-label for better accessibility.
The button's visual state changes (icon switches from copy to check), but the
aria-labelremains static. Screen reader users would benefit from a dynamic label that reflects the current state.♻️ Suggested improvement
- aria-label="copy button" + :aria-label="copied ? 'Copied to clipboard' : 'Copy to clipboard'"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/app/components/UInputCopy.vue` at line 40, The aria-label is static; make it dynamic by binding it to the component's copy state (e.g., replace aria-label="copy button" with :aria-label="isCopied ? 'copied' : 'copy to clipboard'") and ensure the reactive flag (e.g., isCopied) is set/cleared in the copy handler (e.g., copyText or onCopy) so the label updates when the icon switches between copy and check in UInputCopy.vue.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/app.config.ts`:
- Around line 1-8: Delete the redundant app.config.ts file that contains the
exported default defineAppConfig block (the one setting ui.colors with primary:
'green' and neutral: 'zinc'); Nuxt only merges the project-root app.config.ts,
so remove this duplicate file to eliminate dead code and keep the single root
app.config.ts as the source of truth.
In `@docs/app/components/AppFooter.vue`:
- Around line 9-15: The external NuxtLink elements (the NuxtLink that links to
the LICENSE and the other external NuxtLink in the footer) open in a new tab
without rel protection; update both NuxtLink components to include rel="noopener
noreferrer" alongside target="_blank" so external links are hardened (locate the
NuxtLink components in AppFooter.vue and add the rel attribute to each).
In `@docs/app/components/UInputCopy.vue`:
- Line 23: The class string assigned to the component's "base" (currently
containing "field-sizing-content min-w-[34ch] whitespace-nowrap") relies on the
unsupported-for-Firefox utility "field-sizing-content"; change this to provide a
Firefox-safe fallback or use CSS feature detection: keep the existing
"min-w-[34ch]" and "whitespace-nowrap" as fallbacks, add a Tailwind fallback
like "min-w-fit" or "min-w-min" alongside "field-sizing-content", or add a small
<style> block with `@supports` (min-width: min-content) { .your-class { /* use
field-sizing-content behavior */ } } `@supports` not (min-width: min-content) {
.your-class { min-width: 34ch; } }, and update the "base" reference to use that
class name (referencing the "base" variable and the class name you add) so
Firefox gets the fallback.
In `@docs/app/pages/index.vue`:
- Line 5: The homepage description constant description contains awkward wording
"secured & sealed cookies sessions"; update the string value assigned to
description so it reads naturally and grammatically (e.g., "Add authentication
to Nuxt applications with secure, sealed cookie sessions"), by editing the
description constant in docs/app/pages/index.vue.
In `@docs/content/2.usage/1.session.md`:
- Line 38: Update the API table entry for openInPopup to show the correct
parameter types: replace the Type cell value `() => void` with the full
signature `(route: string, size?: { width?: number, height?: number }) => void`
so the documentation reflects the actual function parameters (openInPopup,
route, size) and the optional size.width/size.height fields.
- Line 75: Update the documentation for getUserSession to accurately describe
its return shape: state that it always returns a session object (even when no
session exists) containing at least an id and data (data may be an empty
object), but may also include other stored session properties and an optional
user property; change the sentence "returns `{ id }` with an empty data object"
to reflect that additional session fields can be present and that user is
optional so callers know to check for their presence.
In `@docs/content/2.usage/4.webauthn.md`:
- Around line 92-101: The onSuccess handler calls
db.users.findByCredentialId(credential.id) and then uses user.id without
verifying the lookup; if findByCredentialId returns null/undefined the code will
throw. Add a null-check after calling db.users.findByCredentialId in the
onSuccess function (and before setUserSession) to handle the missing user: log
or return an appropriate auth error/response (or throw a controlled error)
instead of proceeding, and ensure you still update the credential counter only
when appropriate or handle that failure path consistently.
In `@docs/content/2.usage/5.atproto.md`:
- Around line 66-68: Update the example value for clientId (next to redirectURL)
to the full metadata document URL rather than just the origin; replace the
current 'https://your-app.com' example used for clientId with a URL pointing to
the client metadata JSON (e.g., 'https://your-app.com/client-metadata.json') so
the AT Protocol OAuth discovery uses the correct document location.
In `@docs/nuxt.config.ts`:
- Around line 17-21: The config currently sets
content.experimental.sqliteConnector = 'native' which is experimental; either
change that setting to a stable connector (e.g., set
content.experimental.sqliteConnector to 'better-sqlite3' or the equivalent
stable option your framework supports) or add a clear comment/docs entry and
README note next to content.experimental explaining that 'native' relies on
Node's experimental node:sqlite (v22.5.0+) and is intentionally accepted for
this deployment; update any deployment docs to list platform/Node version
constraints and fallback connector guidance.
---
Nitpick comments:
In `@docs/app/components/UInputCopy.vue`:
- Line 40: The aria-label is static; make it dynamic by binding it to the
component's copy state (e.g., replace aria-label="copy button" with
:aria-label="isCopied ? 'copied' : 'copy to clipboard'") and ensure the reactive
flag (e.g., isCopied) is set/cleared in the copy handler (e.g., copyText or
onCopy) so the label updates when the icon switches between copy and check in
UInputCopy.vue.
🪄 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 Plus
Run ID: 23ea0e65-1fd7-4992-b849-b3f58565a3cf
⛔ Files ignored due to path filters (3)
docs/screenshots/documentationPage.pngis excluded by!**/*.pngdocs/screenshots/landingPage.pngis excluded by!**/*.pngpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (32)
docs/app.config.tsdocs/app/app.config.tsdocs/app/app.vuedocs/app/assets/css/main.cssdocs/app/components/AppFooter.vuedocs/app/components/AppHeader.vuedocs/app/components/AppLogo.vuedocs/app/components/OgImage/AuthUtils.takumi.vuedocs/app/components/UInputCopy.vuedocs/app/layouts/default.vuedocs/app/layouts/docs.vuedocs/app/pages/[...slug].vuedocs/app/pages/index.vuedocs/content.config.tsdocs/content/1.getting-started/.navigation.ymldocs/content/1.getting-started/1.installation.mddocs/content/1.getting-started/2.configuration.mddocs/content/2.usage/.navigation.ymldocs/content/2.usage/1.session.mddocs/content/2.usage/2.oauth.mddocs/content/2.usage/3.password-hashing.mddocs/content/2.usage/4.webauthn.mddocs/content/2.usage/5.atproto.mddocs/content/2.usage/6.extend-session.mddocs/content/2.usage/7.hybrid-rendering.mddocs/content/2.usage/8.websocket.mddocs/nuxt.config.tsdocs/package.jsondocs/tsconfig.jsonpackage.jsonplayground/app/pages/index.vuepnpm-workspace.yaml
…efox lack of support.
…qlite3 and the repo already configures in with onlyBuiltDependencies
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/app/components/AppFooter.vue (1)
20-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd
rel="noopener noreferrer"to the GitHub button link.This external
target="_blank"link still lacksrelprotection.Suggested fix
<UButton aria-label="Nuxt Auth Utils on GitHub" icon="i-simple-icons-github" to="https://github.com/atinux/nuxt-auth-utils" target="_blank" + rel="noopener noreferrer" color="neutral" variant="ghost" size="sm" />🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/app/components/AppFooter.vue` around lines 20 - 28, The UButton rendering the external GitHub link (component UButton with aria-label "Nuxt Auth Utils on GitHub") uses target="_blank" but lacks rel protection; update the UButton props to include rel="noopener noreferrer" so the anchor generated for the to="https://github.com/atinux/nuxt-auth-utils" link uses rel="noopener noreferrer" to prevent tab-napping and leaking window.opener.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/content/2.usage/5.atproto.md`:
- Around line 61-66: Update the atproto docs so the example OAuth metadata URL
is consistent: change the runtimeConfig example value referenced as
runtimeConfig.oauth.bluesky.clientId to match the earlier shown metadata URL
format (i.e., use the metadata document path /bluesky/client-metadata.json
rather than /client-metadata.json), and ensure any other occurrences in this doc
use the identical metadata document URL pattern used in the explanatory
paragraph.
---
Duplicate comments:
In `@docs/app/components/AppFooter.vue`:
- Around line 20-28: The UButton rendering the external GitHub link (component
UButton with aria-label "Nuxt Auth Utils on GitHub") uses target="_blank" but
lacks rel protection; update the UButton props to include rel="noopener
noreferrer" so the anchor generated for the
to="https://github.com/atinux/nuxt-auth-utils" link uses rel="noopener
noreferrer" to prevent tab-napping and leaking window.opener.
🪄 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 Plus
Run ID: 105f4bac-a395-411f-a40b-6f2a73c40f56
📒 Files selected for processing (7)
docs/app/components/AppFooter.vuedocs/app/components/UInputCopy.vuedocs/app/pages/index.vuedocs/content/2.usage/1.session.mddocs/content/2.usage/4.webauthn.mddocs/content/2.usage/5.atproto.mddocs/nuxt.config.ts
💤 Files with no reviewable changes (1)
- docs/nuxt.config.ts
✅ Files skipped from review due to trivial changes (2)
- docs/app/pages/index.vue
- docs/content/2.usage/4.webauthn.md
The documentation for Nuxt Auth Utils is in the README file. I have added Nuxt Content to create a website that will display a landing page and then a documentation page.
Website follows the layout as well as look and feel of other nuxt ecosystems like Nuxt Content and Nuxt UI.
The landing page looks like this:

The documentation page looks like this:

Summary by CodeRabbit
New Features
Documentation
Chores