Skip to content

feat: Implement guide matricole #45

Merged
lorenzocorallo merged 3 commits into
mainfrom
guidaMatricole
Jul 13, 2026
Merged

feat: Implement guide matricole #45
lorenzocorallo merged 3 commits into
mainfrom
guidaMatricole

Conversation

@BIA3IA

@BIA3IA BIA3IA commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Add functionality for creating, deleting, and displaying guides.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds a dashboard page for listing, creating, and deleting web guides, with authorized server actions, optimistic table updates, sidebar navigation, simplified DataTable typing, and supporting runtime configuration.

Changes

Guide management

Layer / File(s) Summary
DataTable contract alignment
src/components/data-table.tsx, src/app/dashboard/(active)/azure/members/table.tsx
Simplifies DataTable generics, accepts ColumnDef<TData, any>[], and removes the Azure table’s TypeScript suppression.
Guide data and server actions
src/app/dashboard/(active)/web/guide/types.ts, src/server/actions/guides.ts, package.json, next.config.ts
Defines the Guide shape and adds authorized retrieval, creation, and deletion actions backed by the guides API; updates the backend package and configures Azure Blob images and 2 MB server-action bodies.
Guide dashboard interactions
src/app/dashboard/(active)/web/guide/*
Adds the server-rendered guide page, client table, formatted columns, creation dialog, upload handling, deletion confirmation, toast outcomes, optimistic updates, and router refreshes.
Guide navigation entry
src/components/dashboard-sidebar/data.tsx
Adds the Web → Guide dashboard navigation route at /dashboard/web/guide.

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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding guide matricole creation, deletion, and display features.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

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

@BIA3IA BIA3IA added the status: blocked Work cannot proceed until another issue is resolved label Jul 9, 2026
@BIA3IA BIA3IA marked this pull request as ready for review July 10, 2026 20:35
@BIA3IA BIA3IA removed the status: blocked Work cannot proceed until another issue is resolved label Jul 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ba09a88 and 02166b4.

📒 Files selected for processing (10)
  • src/app/dashboard/(active)/azure/members/table.tsx
  • src/app/dashboard/(active)/web/guide/columns.tsx
  • src/app/dashboard/(active)/web/guide/create-guide.tsx
  • src/app/dashboard/(active)/web/guide/delete-guide.tsx
  • src/app/dashboard/(active)/web/guide/page.tsx
  • src/app/dashboard/(active)/web/guide/table.tsx
  • src/app/dashboard/(active)/web/guide/types.ts
  • src/components/dashboard-sidebar/data.tsx
  • src/components/data-table.tsx
  • src/server/actions/guides.ts

Comment thread src/app/dashboard/(active)/web/guide/table.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
next.config.ts (1)

14-21: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Narrow the remote image allowlist if storage is application-owned.

**.blob.core.windows.net permits 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

📥 Commits

Reviewing files that changed from the base of the PR and between 02166b4 and b4f5fe5.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • next.config.ts
  • package.json
  • src/server/actions/guides.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/server/actions/guides.ts

@lorenzocorallo lorenzocorallo merged commit 79b68c9 into main Jul 13, 2026
2 checks passed
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.

2 participants