-
-
Notifications
You must be signed in to change notification settings - Fork 19
Add request education features button and handle upskii-specific services #3087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d add platform services to user schema
WalkthroughThis update introduces a new platform service enum and user Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VerifyTokenPage
participant TokenVerifier
participant TokenVerifierCore
participant verifyRouteToken
User->>VerifyTokenPage: Visit verify-token page
VerifyTokenPage->>TokenVerifier: Render with devMode
TokenVerifier->>TokenVerifierCore: Render with devMode
TokenVerifierCore->>verifyRouteToken: Call with devMode
verifyRouteToken-->>TokenVerifierCore: Result (token verified)
TokenVerifierCore-->>TokenVerifier: Render outcome
TokenVerifier-->>VerifyTokenPage: Render outcome
sequenceDiagram
participant Admin
participant ApprovalsPage
participant getApprovalRequests
participant DataTable
participant ApprovalRowActions
Admin->>ApprovalsPage: Visit approvals page
ApprovalsPage->>getApprovalRequests: Fetch filtered approval requests
getApprovalRequests-->>ApprovalsPage: Return requests data
ApprovalsPage->>DataTable: Render with requests
DataTable->>ApprovalRowActions: Render actions per row
Admin->>ApprovalRowActions: Approve/Reject/View details
ApprovalRowActions->>ApprovalsPage: (On approve/reject) Reload data
Possibly related PRs
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
apps/nova/src/app/[locale]/(auth)/verify-token/page.tsxOops! Something went wrong! :( ESLint: 9.29.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@typescript-eslint/parser' imported from /eslint.config.mjs apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsxOops! Something went wrong! :( ESLint: 9.29.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@typescript-eslint/parser' imported from /eslint.config.mjs apps/calendar/src/app/[locale]/(auth)/verify-token/page.tsxOops! Something went wrong! :( ESLint: 9.29.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@typescript-eslint/parser' imported from /eslint.config.mjs
✨ Finishing Touches
🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Filter for users who have the services attribute of the respective service
Approval Module Request Education banner
Change styling of button
Fix build errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🔭 Outside diff range comments (1)
packages/auth/src/cross-app/index.ts (1)
235-253
: Avoid readingres.json()
twice – second call will throw and skip the happy‐path
Response
bodies are single-read streams.
The first read inside the!res.ok
branch consumes the stream, so the second read a few lines later will reject with “body used already” anduserId
will stayundefined
, breaking redirection.- if (!res.ok) { - const data = await res.json(); - console.error('Error verifying token:', data.error); - router.push('/'); - router.refresh(); - } - - const data = await res.json(); + const data = await res.json().catch(() => null); + + if (!res.ok || !data) { + console.error('Error verifying token:', data?.error ?? res.statusText); + router.push('/'); + router.refresh(); + return; + }The single parse also lets you remove the duplicated
data
declaration.
Consider wrapping thefetch
call in atry / catch
to surface network failures explicitly.
♻️ Duplicate comments (3)
apps/upskii/src/app/[locale]/(auth)/verify-token/page.tsx (1)
1-5
: Same sanity-check as in NovaEnsure
DEV_MODE
is actually a boolean before forwarding. See the comment on the Nova file.apps/rewise/src/app/[locale]/(auth)/verify-token/page.tsx (1)
1-5
: Same sanity-check as in NovaEnsure
DEV_MODE
is actually a boolean before forwarding. See the comment on the Nova file.apps/famigo/src/app/[locale]/(auth)/verify-token/page.tsx (1)
1-5
: Same sanity-check as in NovaEnsure
DEV_MODE
is actually a boolean before forwarding. See the comment on the Nova file.
🧹 Nitpick comments (15)
packages/auth/src/cross-app/token-verifier.tsx (2)
6-6
: MakedevMode
optional with a sane default
TokenVerifier
now requires callers to providedevMode
. Any remaining consumer that was not updated will fail to compile. 99 % of the time we just want “false” outside of dev builds, so expose a default to keep the API non-breaking:-export function TokenVerifier({ devMode }: { devMode: boolean }) { +export function TokenVerifier({ devMode = false }: { devMode?: boolean }) {This retains type-safety while preventing accidental breakages and reduces noise at call-sites that truly don’t care about the flag.
20-27
: Factor out duplicated loading UIThe suspense fallback duplicates the exact markup that already exists inside
TokenVerifierCore
. Consider extracting a<CenteredLoader/>
component (or re-usingLoadingIndicator
directly) to avoid repetition and keep both call-sites visually in sync.This is cosmetic but improves maintainability.
packages/auth/src/cross-app/token-verifier-core.tsx (1)
8-15
:devMode
should be optional with a sane default
TokenVerifierCore
now mandatesdevMode: boolean
, which forces every call-site to be updated immediately. An optional prop with a default value keeps the public API backward-compatible while still allowing the new behaviour:-export function TokenVerifierCore({ devMode }: { devMode: boolean }) { +export function TokenVerifierCore({ devMode = false }: { devMode?: boolean }) {No functional change, but it prevents breakages in downstream apps that haven’t been migrated yet.
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/status-filter.tsx (2)
20-33
: Avoid producing a trailing “?” when no query params remainIf the user selects “All” while on the first page with no other filters,
params.toString()
resolves to an empty string, resulting in the route/?
:- router.push(`?${params.toString()}`); + const qs = params.toString(); + router.push(qs ? `?${qs}` : '.');(This keeps the URL clean and prevents an unnecessary history entry).
35-46
: Considerrouter.replace
to prevent stack spamFiltering is a UI concern; using
push
creates a new history entry every time the user toggles the dropdown.replace
keeps the back-button behaviour predictable.apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx (1)
54-61
: Remove leftover debug loggingConsole output on the server clutters logs:
- console.log('ENABLE_EDUCATION', ENABLE_EDUCATION);
packages/auth/src/cross-app/index.ts (1)
210-216
:devMode
is required but undocumented & untyped routerThe new
devMode
flag is handy, but the parameter object still usesany
forrouter
, losing IntelliSense and type-safety. Prefer importingAppRouterInstance
(next/navigation
) here.import type { AppRouterInstance } from 'next/navigation'; … router: AppRouterInstance;Also document the expected behaviour of
devMode
in the JSDoc above the function.apps/upskii/src/components/request-access-button.tsx (2)
60-67
: Reset textarea when the dialog closesCancelling or simply toggling the dialog leaves the previous message in state.
Small UX win: clear the message when the dialog is closed so the next attempt starts with an empty field.- <Dialog open={open} onOpenChange={setOpen}> + <Dialog + open={open} + onOpenChange={(o) => { + if (!o) setMessage(''); + setOpen(o); + }} + >
40-46
: TODO left in committed code
// TODO: Replace with actual API call
will be flagged by the linter (eslint/no-warning-comments
).
Either convert it to a proper task tracked elsewhere or suppress via// eslint-disable-next-line eslint/no-warning-comments
until the real API is wired up.apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsx (2)
142-163
: Potential count mismatch identical to NOVA implementationSame pattern:
userData
is filtered for"UPSKII"
after the fact, whilecountData
is returned untouched. Verify the RPC applies the same service filter; if not, pagination will be off.Additionally, note the
select()
still pullsnova_team_members
. That join is irrelevant here and adds overhead – worth dropping for Upskii.
175-176
: Null-safe filter onusers.services
contains('users.services', ['UPSKII'])
excludes rows whereservices
isNULL
.
If historical users lack the column, decide whether they should be visible; otherwise you may needcoalesce(services, '{}')
in the RPC or a migration to default to an empty array.apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx (1)
165-180
: Move mock logic out of production bundle
mockApprovalAction
ships test code to users. Export a real API helper or guard-import the mock behindprocess.env.NODE_ENV !== 'production'
to keep bundles lean.apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/columns.tsx (2)
8-9
: Heavymoment
dependency
moment
adds ~300 KB gzip. Considerdayjs
/date-fns
or nativeIntl.DateTimeFormat
for a lighter bundle.
11-14
: Leakyany
typing
approvalsColumns
receivest
asany
. Declare a proper i18n type (e.g.,TFunction
) to retain type-safety across the table.packages/types/src/supabase.ts (1)
7868-7870
: Suspicious enum value"TUTURUUU"
platform_service
now contains"TUTURUUU"
.
Is the triple-U spelling intentional? Typos in enum values silently break look-ups and equality checks across FE/BE, and they are hard to migrate later.Also applies to: 8021-8024
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (20)
apps/calendar/src/app/[locale]/(auth)/verify-token/page.tsx
(1 hunks)apps/db/supabase/migrations/20250609135112_add_platform_services.sql
(1 hunks)apps/famigo/src/app/[locale]/(auth)/verify-token/page.tsx
(1 hunks)apps/nova/src/app/[locale]/(auth)/verify-token/page.tsx
(1 hunks)apps/nova/src/app/[locale]/(dashboard)/(admin)/(role-management)/users/page.tsx
(3 hunks)apps/rewise/src/app/[locale]/(auth)/verify-token/page.tsx
(1 hunks)apps/upskii/src/app/[locale]/(auth)/verify-token/page.tsx
(1 hunks)apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsx
(3 hunks)apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/columns.tsx
(1 hunks)apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/page.tsx
(1 hunks)apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx
(1 hunks)apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/status-filter.tsx
(1 hunks)apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/layout.tsx
(1 hunks)apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx
(4 hunks)apps/upskii/src/components/request-access-button.tsx
(1 hunks)apps/upskii/src/components/request-education-banner.tsx
(1 hunks)packages/auth/src/cross-app/index.ts
(2 hunks)packages/auth/src/cross-app/token-verifier-core.tsx
(1 hunks)packages/auth/src/cross-app/token-verifier.tsx
(2 hunks)packages/types/src/supabase.ts
(15 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (5)
packages/auth/src/cross-app/token-verifier.tsx (1)
packages/auth/src/cross-app/token-verifier-core.tsx (1)
TokenVerifierCore
(8-22)
apps/upskii/src/app/[locale]/(auth)/verify-token/page.tsx (1)
packages/auth/src/cross-app/token-verifier.tsx (1)
TokenVerifier
(6-30)
packages/auth/src/cross-app/token-verifier-core.tsx (1)
packages/auth/src/cross-app/index.ts (1)
verifyRouteToken
(206-269)
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx (3)
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/page.tsx (1)
WorkspaceApprovalRequest
(164-175)packages/ui/src/components/ui/sonner.tsx (1)
toast
(29-29)packages/ui/src/components/ui/dropdown-menu.tsx (5)
DropdownMenu
(241-241)DropdownMenuTrigger
(255-255)DropdownMenuContent
(243-243)DropdownMenuItem
(245-245)DropdownMenuSeparator
(250-250)
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx (2)
packages/utils/src/user-helper.ts (1)
getCurrentUser
(16-41)apps/upskii/src/components/request-education-banner.tsx (1)
EducationBanner
(13-56)
🪛 GitHub Check: codecov/patch
apps/nova/src/app/[locale]/(auth)/verify-token/page.tsx
[warning] 5-5: apps/nova/src/app/[locale]/(auth)/verify-token/page.tsx#L5
Added line #L5 was not covered by tests
apps/calendar/src/app/[locale]/(auth)/verify-token/page.tsx
[warning] 5-5: apps/calendar/src/app/[locale]/(auth)/verify-token/page.tsx#L5
Added line #L5 was not covered by tests
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/layout.tsx
[warning] 75-79: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/layout.tsx#L75-L79
Added lines #L75 - L79 were not covered by tests
apps/rewise/src/app/[locale]/(auth)/verify-token/page.tsx
[warning] 5-5: apps/rewise/src/app/[locale]/(auth)/verify-token/page.tsx#L5
Added line #L5 was not covered by tests
apps/upskii/src/app/[locale]/(auth)/verify-token/page.tsx
[warning] 5-5: apps/upskii/src/app/[locale]/(auth)/verify-token/page.tsx#L5
Added line #L5 was not covered by tests
apps/nova/src/app/[locale]/(dashboard)/(admin)/(role-management)/users/page.tsx
[warning] 139-147: apps/nova/src/app/[locale]/(dashboard)/(admin)/(role-management)/users/page.tsx#L139-L147
Added lines #L139 - L147 were not covered by tests
[warning] 152-157: apps/nova/src/app/[locale]/(dashboard)/(admin)/(role-management)/users/page.tsx#L152-L157
Added lines #L152 - L157 were not covered by tests
[warning] 171-171: apps/nova/src/app/[locale]/(dashboard)/(admin)/(role-management)/users/page.tsx#L171
Added line #L171 was not covered by tests
[warning] 220-220: apps/nova/src/app/[locale]/(dashboard)/(admin)/(role-management)/users/page.tsx#L220
Added line #L220 was not covered by tests
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/status-filter.tsx
[warning] 2-48: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/status-filter.tsx#L2-L48
Added lines #L2 - L48 were not covered by tests
apps/upskii/src/components/request-access-button.tsx
[warning] 3-4: apps/upskii/src/components/request-access-button.tsx#L3-L4
Added lines #L3 - L4 were not covered by tests
[warning] 13-17: apps/upskii/src/components/request-access-button.tsx#L13-L17
Added lines #L13 - L17 were not covered by tests
[warning] 24-30: apps/upskii/src/components/request-access-button.tsx#L24-L30
Added lines #L24 - L30 were not covered by tests
[warning] 32-36: apps/upskii/src/components/request-access-button.tsx#L32-L36
Added lines #L32 - L36 were not covered by tests
[warning] 38-39: apps/upskii/src/components/request-access-button.tsx#L38-L39
Added lines #L38 - L39 were not covered by tests
[warning] 41-46: apps/upskii/src/components/request-access-button.tsx#L41-L46
Added lines #L41 - L46 were not covered by tests
[warning] 48-58: apps/upskii/src/components/request-access-button.tsx#L48-L58
Added lines #L48 - L58 were not covered by tests
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/columns.tsx
[warning] 2-129: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/columns.tsx#L2-L129
Added lines #L2 - L129 were not covered by tests
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx
[warning] 2-180: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx#L2-L180
Added lines #L2 - L180 were not covered by tests
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/page.tsx
[warning] 2-175: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/page.tsx#L2-L175
Added lines #L2 - L175 were not covered by tests
apps/famigo/src/app/[locale]/(auth)/verify-token/page.tsx
[warning] 5-5: apps/famigo/src/app/[locale]/(auth)/verify-token/page.tsx#L5
Added line #L5 was not covered by tests
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx
[warning] 5-5: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx#L5
Added line #L5 was not covered by tests
[warning] 54-61: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx#L54-L61
Added lines #L54 - L61 were not covered by tests
[warning] 278-278: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx#L278
Added line #L278 was not covered by tests
[warning] 281-284: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx#L281-L284
Added lines #L281 - L284 were not covered by tests
[warning] 323-325: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx#L323-L325
Added lines #L323 - L325 were not covered by tests
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsx
[warning] 142-152: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsx#L142-L152
Added lines #L142 - L152 were not covered by tests
[warning] 156-161: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsx#L156-L161
Added lines #L156 - L161 were not covered by tests
[warning] 175-175: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsx#L175
Added line #L175 was not covered by tests
[warning] 224-224: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(admin)/(role-management)/users/page.tsx#L224
Added line #L224 was not covered by tests
🪛 GitHub Check: CodeFactor
apps/upskii/src/components/request-access-button.tsx
[notice] 40-40: apps/upskii/src/components/request-access-button.tsx#L40
Unresolved 'todo' comment. (eslint/no-warning-comments)
[notice] 144-144: apps/upskii/src/components/request-access-button.tsx#L144
Unresolved 'todo' comment. (eslint/no-warning-comments)
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx
[notice] 45-45: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx#L45
Unresolved 'todo' comment. (eslint/no-warning-comments)
[notice] 30-30: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx#L30
Unresolved 'todo' comment. (eslint/no-warning-comments)
[notice] 168-168: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx#L168
Unresolved 'todo' comment. (eslint/no-warning-comments)
[notice] 58-58: apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx#L58
Unresolved 'todo' comment. (eslint/no-warning-comments)
🔇 Additional comments (14)
apps/nova/src/app/[locale]/(auth)/verify-token/page.tsx (1)
1-5
: ConfirmDEV_MODE
is a boolean constant
TokenVerifier
expects a boolean, but environment flags sometimes arrive as strings ('true' | 'false'
). Double-check the definition in@/constants/common
and coerce if necessary, e.g.:export const DEV_MODE = process.env.NEXT_PUBLIC_DEV_MODE === 'true';Failing to do so will silently pass a truthy string and change runtime behaviour.
apps/calendar/src/app/[locale]/(auth)/verify-token/page.tsx (1)
1-5
: Looks good – constant propagated correctly
DEV_MODE
is forwarded without altering existing logic.apps/upskii/src/app/[locale]/(dashboard)/[wsId]/layout.tsx (3)
5-5
: Import is fine
EducationBanner
pulled in without side-effects.
281-284
: Variable naming: favour explicit boolean
isWorkspaceCreator
is boolean – good.shouldShowRequestButton
combines two flags clearly – LGTM.
323-325
: Minor: avoid rendering empty banner propsGuard already ensures
workspace.name
exists, so safe. No action required.apps/nova/src/app/[locale]/(dashboard)/(admin)/(role-management)/users/page.tsx (1)
152-159
:userCount
may now be inconsistent with filtered data
count_search_users
presumably returns the total number of matches before the new"NOVA"
filter is applied. After filtering the array on the client,userData.length
can be ≠userCount
, breaking pagination/UI.Make sure the RPC itself filters on
users.services @> ARRAY['NOVA']
(or add a dedicated count on the client).userCount: (countData || 0) as number // ensure server already filteredOtherwise compute the count from the filtered list.
apps/upskii/src/components/request-education-banner.tsx (1)
52-54
: Looks good – cohesive compositionThe banner cleanly delegates submission logic to
RequestAccessButton
and is themable. No issues spotted.apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx (1)
55-58
: TODO left unimplemented — provide user flow
handleViewDetails
only throws a toast. Either implement a modal/route or remove the menu item until it’s ready. Leaving dead-end actions frustrates users.apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/page.tsx (1)
21-32
: Redundantawait
statementsBecause
params
/searchParams
are synchronous objects, the multipleawait
usages are no-ops. Removing them simplifies the flow and avoids misleading async semantics.apps/db/supabase/migrations/20250609135112_add_platform_services.sql (1)
12-74
: Potential race onused_at
update
UPDATE cross_app_tokens … WHERE token = p_token;
lacks a status check. Concurrent requests could mark the same token used multiple times. Addused_at IS NULL
to theWHERE
clause or useRETURNING
to ensure single consumption.UPDATE public.cross_app_tokens SET used_at = now() WHERE token = p_token AND used_at IS NULL;packages/types/src/supabase.ts (4)
4511-4534
: Newservices
column requires callers & default-handling updatesThe
users
table now exposes an optionalservices: platform_service[] | null
field.
- Verify that every read/write path (API, Prisma‐layer, zod schemas, UI forms, etc.) tolerates:
• undefined (Insert/Update)
•null
(Row)
• an empty array- If a non-null default (e.g.
'NOVA'
) was set in the migration, keeping the TS type asnull | …[]
can lead to unnecessary null-checks. Consider aligning the generated type with DB reality by settingdefault null
→null
removed, or document the divergence.
7780-7788
:search_users
signature changed → audit all call-sites
page_number
&page_size
are now mandatory in all union members. Old code passing{search_query}
only will no longer type-check and will fail at runtime when calling the RPC.
Run a global grep-for-usage before merging.
7848-7854
:validate_cross_app_token_with_session
type lacks the newdevMode
arg mentioned in PR descriptionThe PR summary says the function was reordered and extended with a
devMode
flag, but the generated type still shows only(p_token, p_target_app)
.
Either the summary is outdated or the type generation missed a DB change—both are dangerous.Likely an incorrect or invalid review comment.
7442-7446
: Bulk argument / return-shape tweaks – double-check generated clientsSeveral stored procedures had subtle shape changes (added fields, reordered args). Auto-generated clients must be regenerated (
supabase gen types
/openapi-ts
, etc.) and committed, otherwise consumers will compile against stale signatures.Also applies to: 7493-7498, 7513-7520, 7560-7565, 7700-7701, 7722-7725, 7743-7745, 7755-7757
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/layout.tsx
Show resolved
Hide resolved
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx
Show resolved
Hide resolved
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/row-actions.tsx
Show resolved
Hide resolved
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/columns.tsx
Show resolved
Hide resolved
apps/upskii/src/app/[locale]/(dashboard)/[wsId]/(workspace-settings)/approvals/page.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @VNOsST.
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes
Database & Types