Skip to content

chore: gate shared package, remove Storybook, document rate-limit env - #649

Open
Ryzenthefirst wants to merge 2 commits into
accensa:mainfrom
Ryzenthefirst:claude/github-issues-batch-pr-1b343d
Open

Ryzenthefirst wants to merge 2 commits into
accensa:mainfrom
Ryzenthefirst:claude/github-issues-batch-pr-1b343d

Conversation

@Ryzenthefirst

@Ryzenthefirst Ryzenthefirst commented Oct 17, 2026 •

Copy link
Copy Markdown

Closes #596
Closes #594
Closes #595
Closes #589

Changes

Verification

  • prettier --check on every touched file passes.
  • pnpm lint, pnpm typecheck and pnpm test were not confirmed locally (a full install took ~47 min on a slow registry); CI will run them.
  • apps/web/src/app/api/merchant/settings/notifications/route.test.ts (11 tests, run in isolation) passes: proves each of the five field-level 400 messages (route.ts:73, :79, :88, :97, :106), the secret-stripping GET projection and the DATABASE_URL 500 guard on both verbs.

Summary by CodeRabbit

  • Documentation
    • Added guidance on rate-limiting behavior, including the configuration needed for consistent limits across multiple instances.
  • Tests
    • Added coverage for merchant notification settings, including validation, error handling, and protection of sensitive values.
  • Chores
    • Removed Storybook configuration, component demos, and related scripts and development packages.
    • Expanded root lint and type-check commands to include the shared package.

- Run @accensa/shared lint and typecheck from the root scripts (accensa#594)
- Remove the unbuilt Storybook config, stories and devDependencies (accensa#595)
- Document UPSTASH_REDIS_REST_URL/TOKEN in apps/web/README.md (accensa#589)
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@Ryzenthefirst Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@Ryzenthefirst is attempting to deploy a commit to the ACCENSA Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5fdda75a-2b22-42b1-b7a7-9e327242ff5f
📥 Commits

Reviewing files that changed from the base of the PR and between 79e2b6e and 459edbc.

⛔ Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 10
  • apps/web/.storybook/main.ts
  • apps/web/.storybook/preview.ts
  • apps/web/README.md
  • apps/web/package.json
  • apps/web/src/app/api/merchant/settings/notifications/route.test.ts
  • apps/web/src/components/data-table.stories.tsx
  • apps/web/src/components/data-table.tsx
  • package.json
  • packages/shared/src/components/badge.stories.tsx
  • packages/shared/src/components/cta-button.stories.tsx
💤 Files with no reviewable changes: 5
  • apps/web/.storybook/preview.ts
  • packages/shared/src/components/cta-button.stories.tsx
  • apps/web/src/components/data-table.stories.tsx
  • apps/web/.storybook/main.ts
  • packages/shared/src/components/badge.stories.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The changes add shared-package checks to root scripts, remove Storybook configuration and stories, document rate-limiter backend selection, and add tests for merchant notification settings routes.

Changes: Shared Package Checks

Layer / File(s) Summary
Add shared-package checks
package.json
The root lint and typecheck scripts now run the corresponding checks for @accensa/shared after the existing web and SDK checks.

Storybook Removal

Layer / File(s) Summary
Remove Storybook setup and stories
apps/web/.storybook/*, apps/web/package.json, apps/web/src/components/data-table.stories.tsx, packages/shared/src/components/*.stories.tsx, apps/web/README.md, apps/web/src/components/data-table.tsx
Storybook configuration, scripts, dependencies, and three component story files were removed. The README describes the removal, and the DataTable comment no longer refers to Storybook.

Rate-Limiter Documentation

Layer / File(s) Summary
Document limiter backend selection
apps/web/README.md
The README documents the two Upstash variables, the in-memory fallback, and the multi-instance configuration requirement for the TOTP and reservation limiters.

Notification Settings Route Tests

Layer / File(s) Summary
Test notification settings routes
apps/web/src/app/api/merchant/settings/notifications/route.test.ts
New tests cover GET responses, missing DATABASE_URL, PATCH validation failures, and successful updates that return settings without secret values.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: stephanieoghenemega-eng, seunfunmi-319509

Merge Risk: ⚪ Minimal · up to 459ed

This change extends root checks to the shared package, removes unused Storybook setup, documents rate-limiter behavior, and adds route tests. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 2 · Failed 2 · Inconclusive 1

Failed Failed checks: 2 warnings · 1 inconclusive

Check name Status Explanation Resolution
Out of Scope Changes check Warning The new apps/web/src/app/api/merchant/settings/notifications/route.test.ts tests are not connected to the supplied linked issues [#594], [#595], or [#589]. They test notification-settings route vali… Remove the notification-settings route tests from this pull request, or link the issue that defines them as a direct objective.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check Inconclusive The supplied summary supports the implementation for [#594]: root lint and typecheck retain the existing filters and add @accensa/shared. It also supports the deletion path for [#595], including… Provide CI results for the root pnpm lint and pnpm typecheck commands, or equivalent evidence that the shared package checks exit zero.
Passed Passed checks: 2 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: adding shared-package checks, removing Storybook, and documenting rate-limit environment variables.
Full details: Out of Scope Changes check

Explanation

The new apps/web/src/app/api/merchant/settings/notifications/route.test.ts tests are not connected to the supplied linked issues [#594], [#595], or [#589]. They test notification-settings route validation, persistence, and database guards. The data-table.tsx documentation change supports the Storybook removal and is in scope, but the notification route tests are a separate feature area.

Resolution

Remove the notification-settings route tests from this pull request, or link the issue that defines them as a direct objective.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Linked Issues check

Explanation

The supplied summary supports the implementation for [#594]: root lint and typecheck retain the existing filters and add @accensa/shared. It also supports the deletion path for [#595], including the scripts, Storybook configuration, dependencies, and three story files, plus README reasoning. The README changes support [#589] by naming both variables and consumers, the all-or-nothing test, the per-process fallback, and the multi-instance requirement. The author did not confirm pnpm lint or pnpm typecheck, and no CI results are supplied. Therefore, the required zero exit status for [#594] is not established.

Resolution

Provide CI results for the root pnpm lint and pnpm typecheck commands, or equivalent evidence that the shared package checks exit zero.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Covers GET public projection, both DATABASE_URL 500 guards, the two body-shape
400s and each field-level 400 message as its own case (accensa#596).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant