feat: Implement guide matricole #45
Conversation
WalkthroughAdds a dashboard page for listing, creating, and deleting web guides, with authorized server actions, optimistic table updates, sidebar navigation, simplified ChangesGuide management
Sequence Diagram(s)sequenceDiagram
participant GuidePage
participant GuideTable
participant ServerActions
participant MatricoleAPI
GuidePage->>ServerActions: getAllGuides()
ServerActions->>MatricoleAPI: getAllGuides.query()
MatricoleAPI-->>GuidePage: guide list
GuidePage->>GuideTable: render guides
GuideTable->>ServerActions: createGuide or deleteGuide
ServerActions->>MatricoleAPI: addGuide or deleteGuide mutation
MatricoleAPI-->>ServerActions: mutation result
ServerActions-->>GuideTable: guide result or error
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
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: 1
🤖 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 `@src/app/dashboard/`(active)/web/guide/table.tsx:
- Around line 12-22: Synchronize the local items state with refreshed server
data: import and use useEffect in the GuideTable component to call
setItems(guides) whenever the guides prop changes, while preserving the
optimistic updates in handleCreated and handleDeleted.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 73c29c37-8c57-447c-b479-7447a99a1b21
📒 Files selected for processing (10)
src/app/dashboard/(active)/azure/members/table.tsxsrc/app/dashboard/(active)/web/guide/columns.tsxsrc/app/dashboard/(active)/web/guide/create-guide.tsxsrc/app/dashboard/(active)/web/guide/delete-guide.tsxsrc/app/dashboard/(active)/web/guide/page.tsxsrc/app/dashboard/(active)/web/guide/table.tsxsrc/app/dashboard/(active)/web/guide/types.tssrc/components/dashboard-sidebar/data.tsxsrc/components/data-table.tsxsrc/server/actions/guides.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
next.config.ts (1)
14-21: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winNarrow the remote image allowlist if storage is application-owned.
**.blob.core.windows.netpermits image optimization from every Azure Blob subdomain and unrestricted path. If guides use one known storage account or container, restrict the hostname/path to that scope to avoid accepting unintended external image sources. Next.js documents that broad wildcard patterns can allow URLs beyond those intended. (nextjs.org)🤖 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 `@next.config.ts` around lines 14 - 21, Narrow the images.remotePatterns allowlist to the application-owned Azure Blob storage scope instead of the global **.blob.core.windows.net wildcard. Set the specific storage-account hostname and, when applicable, restrict the pathname to the intended container while preserving HTTPS.
🤖 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.
Nitpick comments:
In `@next.config.ts`:
- Around line 14-21: Narrow the images.remotePatterns allowlist to the
application-owned Azure Blob storage scope instead of the global
**.blob.core.windows.net wildcard. Set the specific storage-account hostname
and, when applicable, restrict the pathname to the intended container while
preserving HTTPS.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b8bb3624-756d-4876-885d-e10ec0b511ba
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
next.config.tspackage.jsonsrc/server/actions/guides.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/server/actions/guides.ts
Add functionality for creating, deleting, and displaying guides.