Skip to content

Feat blocked projects#2929

Merged
HarshMN2345 merged 13 commits intomainfrom
feat-blocked-projects
Mar 26, 2026
Merged

Feat blocked projects#2929
HarshMN2345 merged 13 commits intomainfrom
feat-blocked-projects

Conversation

@HarshMN2345
Copy link
Member

@HarshMN2345 HarshMN2345 commented Mar 24, 2026

What does this PR do?

image image image image

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • New Features

    • Project blocked state: shows a locked overlay, dims/blurs and disables underlying content and sidebar, and disables project-specific actions (e.g., Connect).
    • Contact support flow: “Contact support” opens an in-app support wizard for eligible plans or a mail option otherwise.
    • Improved error page: clearer centered messaging and support action for blocked-resource errors.
  • Chores

    • Updated package dependency versions and overrides.

@appwrite
Copy link

appwrite bot commented Mar 24, 2026

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Dynamic API keys are generated automatically for each function execution

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 24, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds project-blocking detection and applies it across UI. New helper isProjectBlocked(project) returns whether a project is blocked. Navbar’s Connect anchor is conditionally disabled when the project is blocked. App shell sidebar is wrapped in .shell-sidebar-area and set to inert when blocked. Project layout disables and visually blurs/dims slotted content when blocked and renders a fixed overlay with a lock, explanatory text, and a support action that either opens a support wizard or a mailto: link. Project error layout and package.json dependency ranges/overrides were updated.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Feat blocked projects' is somewhat vague and uses an abbreviated word ('Feat'). While it relates to the core feature being added (blocking projects), it lacks clarity and specificity about what exactly is being implemented. Consider using a more descriptive title such as 'Add UI for blocked projects' or 'Implement project blocking state UI' to better communicate the feature intent.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-blocked-projects

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 and usage tips.

@HarshMN2345 HarshMN2345 marked this pull request as ready for review March 26, 2026 07:15
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This PR adds a "blocked project" state to the Appwrite Console: when a project has active blocks (and isn't already paused), users see a blurred/disabled content area with a lock overlay and a "Contact support" button, while the sidebar and the navbar "Connect" button are also locked down.

Key changes:

  • +layout.svelte — renders a full-page overlay with a lock icon and support CTA; blurs and fades the underlying content with filter: blur + opacity: 0.18
  • shell.svelte — wraps the sidebar in a div that gets pointer-events: none when blocked
  • navbar.svelte — disables the "Connect" Button.Anchor when blocked
  • blocked-lock.svg — new lock icon asset

Issues found:

  • Both the main content area (+layout.svelte) and the sidebar wrapper (shell.svelte) rely solely on pointer-events: none / aria-hidden to prevent interaction when blocked. These CSS/ARIA mechanisms do not stop keyboard navigation: a user can still Tab into the blurred content and activate links or buttons. The inert HTML attribute is the correct fix and handles pointer events, keyboard focus, and accessibility in one attribute.
  • The isProjectBlocked reactive expression (status !== 'paused' && !!blocks?.length) is copy-pasted verbatim into three separate files. A shared derived store would remove this duplication and make future changes to the "blocked" definition safe.

Confidence Score: 3/5

Not safe to merge as-is: keyboard users can fully bypass the blocked-project gate

The feature direction and visual design are solid, but both interaction-blocking mechanisms (sidebar in shell.svelte, content area in +layout.svelte) use CSS/ARIA guards that don't stop keyboard navigation. This is a functional gap in the blocking UX — a determined user can Tab past the overlay and use the project normally. Swapping pointer-events: none / aria-hidden for the inert attribute on the same elements is a minimal, targeted fix before merge.

src/routes/(console)/project-[region]-[project]/+layout.svelte and src/lib/layout/shell.svelte both need the inert attribute fix

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/+layout.svelte Adds the main blocked-project overlay UI with blur/opacity on content; aria-hidden + CSS pointer-events: none don't block keyboard access — inert is required
src/lib/layout/shell.svelte Wraps sidebar in a blocking div when project is blocked using pointer-events: none, but keyboard navigation is not prevented — needs inert attribute
src/lib/components/navbar.svelte Disables the "Connect" button when the project is blocked; logic is duplicated from the other two changed files
src/routes/(console)/project-[region]-[project]/blocked-lock.svg New SVG lock icon for the blocked-project overlay; looks correct and self-contained

Reviews (1): Last reviewed commit: "fix layout issues" | Re-trigger Greptile

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/+layout.svelte (1)

34-34: Use an alias for the new SVG import.

./blocked-lock.svg is the only new relative import here. Please switch it to a $routes or $lib alias so this file stays aligned with the repo import convention.

♻️ Suggested change
-    import BlockedLock from './blocked-lock.svg';
+    import BlockedLock from '$routes/(console)/project-[region]-[project]/blocked-lock.svg';

As per coding guidelines "Use $lib, $routes, and $themes path aliases for imports".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte at line 34,
The SVG import uses a relative path; replace the relative import "import
BlockedLock from './blocked-lock.svg';" with the project path alias (e.g.,
import from $routes or $lib) so it follows repo conventions; update the import
to reference the route/lib alias that contains blocked-lock.svg (keeping the
symbol name BlockedLock) and ensure any build/tsconfig alias mappings remain
valid.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/lib/layout/shell.svelte`:
- Line 183: The sidebar wrapper toggles isProjectBlocked but only disables
pointer events; make the wrapper fully non-interactive when isProjectBlocked is
true by applying the inert attribute and aria-hidden="true" on the same
container that currently gets the is-blocked class (so browsers and assistive
tech ignore it), and for extra safety ensure interactive elements inside
Sidebar/SideNavigation respect focus changes (remove or set tabindex to -1 when
isProjectBlocked is true and restore when false). Update the occurrences that
compute/use isProjectBlocked (the wrapper around Sidebar/SideNavigation and the
other two similar blocks) so the inert and aria-hidden toggles are applied
wherever the is-blocked behavior is used.

In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte:
- Around line 37-41: The overlay flag isProjectBlocked currently only controls
visibility but not the command/search registrations; update the code that
registers command-center entries and searchers (the blocks that add keybindings,
register commands or call wizard.start(SupportWizard) or similar project
navigation handlers) so they are skipped when isProjectBlocked is true — i.e.,
wrap or guard those registration calls with if (!isProjectBlocked) { ... } or
return early from the registration functions so Cmd/Ctrl+K and other
navigation/search handlers are not active while the project is blocked.
- Around line 129-130: The content wrapper currently uses
aria-hidden={isProjectBlocked} but remains keyboard-focusable; add
inert={isProjectBlocked} to the <div class="project-layout__content"> (the
element that also has aria-hidden) so its subtree is removed from the tab order
when isProjectBlocked is true; apply the same change to the other content
wrapper instance that uses aria-hidden (the second project-layout__content block
around the <slot />) so blocked content becomes truly inert for keyboard users.
- Around line 135-149: The overlay's absolute positioning centers the dialog
against the full slotted page height (project-layout__overlay /
project-layout__dialog), causing it to be off-screen on long routes; change the
overlay to be viewport-anchored (e.g., position: fixed; inset: 0) or wrap the
dialog in a viewport-sized/sticky container so the lock/message stays centered
in the user's viewport, update relevant styles for project-layout__overlay and
project-layout__dialog and ensure the Contact support Button and contactSupport
handler behavior remain unchanged.

---

Nitpick comments:
In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte:
- Line 34: The SVG import uses a relative path; replace the relative import
"import BlockedLock from './blocked-lock.svg';" with the project path alias
(e.g., import from $routes or $lib) so it follows repo conventions; update the
import to reference the route/lib alias that contains blocked-lock.svg (keeping
the symbol name BlockedLock) and ensure any build/tsconfig alias mappings remain
valid.
🪄 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: 7c2f0b81-dee9-4c9c-91f1-785f82ce08f3

📥 Commits

Reviewing files that changed from the base of the PR and between 2f102ff and 7569512.

⛔ Files ignored due to path filters (1)
  • src/routes/(console)/project-[region]-[project]/blocked-lock.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • src/lib/components/navbar.svelte
  • src/lib/layout/shell.svelte
  • src/routes/(console)/project-[region]-[project]/+layout.svelte

Comment on lines +37 to +41
$: isProjectBlocked = data.project?.status !== 'paused' && !!data.project?.blocks?.length;

function contactSupport() {
wizard.start(SupportWizard);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Blocked mode still leaves command-center entries active.

isProjectBlocked only drives the overlay. The layout still registers project navigation commands and searchers below, so Cmd/Ctrl+K remains a live path into blocked project areas. Gate those registrations with this flag too.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte around lines
37 - 41, The overlay flag isProjectBlocked currently only controls visibility
but not the command/search registrations; update the code that registers
command-center entries and searchers (the blocks that add keybindings, register
commands or call wizard.start(SupportWizard) or similar project navigation
handlers) so they are skipped when isProjectBlocked is true — i.e., wrap or
guard those registration calls with if (!isProjectBlocked) { ... } or return
early from the registration functions so Cmd/Ctrl+K and other navigation/search
handlers are not active while the project is blocked.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/routes/`(console)/project-[region]-[project]/+error.svelte:
- Around line 14-18: The reactive computation for allOrgsHavePremiumSupport and
hasPremiumSupport reads billingPlanDetails unsafely and treats an empty
organization list as premium; modify the logic in the reactive blocks
(allOrgsHavePremiumSupport, hasPremiumSupport) to guard access by checking
isCloud (or defensively using optional access) and ensure the .every check only
runs when $organizationList.teams has items — e.g., only evaluate
team.billingPlanDetails?.premiumSupport when isCloud is true and when
teams.length>0, and fall back to false otherwise so missing/partial payloads or
empty lists do not throw or incorrectly report premium support.
- Around line 44-47: The error title currently checks 'status' in page.error
(which is always false) so replace that check to use the SvelteKit-provided
page.status; update the Typography.Title expression that currently references
page.error to instead render page.status (e.g. use page.status ?? 'Invalid
Argument' or a ternary checking page.status) so the actual HTTP status code is
shown; modify the expression near Typography.Title in +error.svelte and remove
the 'status' in page.error conditional.
🪄 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: 16d530a4-67bf-4656-9a92-f8029f7a18bb

📥 Commits

Reviewing files that changed from the base of the PR and between 5a30fbc and bf51179.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/+error.svelte

Comment on lines +44 to +47
<Typography.Title size="s" align="center">
{'status' in page.error
? page.error.status || 'Invalid Argument'
: 'Invalid Argument'}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

In SvelteKit +error.svelte, is the HTTP status exposed on $app/state's page.statuswhilepage.error only contains the error payload/body?

💡 Result:

Yes, in SvelteKit +error.svelte, the HTTP status is exposed on $app/state's page.status, while page.error contains only the error payload/body (typically { message: string } or extended App.Error object without the status code).

Citations:


Use page.status to display the HTTP error status.

In SvelteKit error routes, the HTTP status is exposed on page.status while page.error contains only the error payload. The current code checks for status in page.error, which never exists, so all error pages will display "Invalid Argument" instead of the actual HTTP status code.

Suggested fix
-                    {'status' in page.error
-                        ? page.error.status || 'Invalid Argument'
-                        : 'Invalid Argument'}
+                    {page.status || 'Invalid Argument'}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Typography.Title size="s" align="center">
{'status' in page.error
? page.error.status || 'Invalid Argument'
: 'Invalid Argument'}
<Typography.Title size="s" align="center">
{page.status || 'Invalid Argument'}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/`(console)/project-[region]-[project]/+error.svelte around lines
44 - 47, The error title currently checks 'status' in page.error (which is
always false) so replace that check to use the SvelteKit-provided page.status;
update the Typography.Title expression that currently references page.error to
instead render page.status (e.g. use page.status ?? 'Invalid Argument' or a
ternary checking page.status) so the actual HTTP status code is shown; modify
the expression near Typography.Title in +error.svelte and remove the 'status' in
page.error conditional.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte:
- Around line 204-216: The overlay (.project-layout__overlay) is currently under
the progress tray (.layout-level-progress-bars) because its z-index is 5 while
the tray is 100; increase the overlay z-index to be higher than the tray (e.g.,
>100) or add a blocked-state modifier that hides/disables
.layout-level-progress-bars when the overlay is active; update the CSS rules for
.project-layout__overlay (or add a .is-blocked modifier) so the overlay visually
and interactively sits above the progress tray and blocks its controls.
- Around line 42-45: The reactive derivations allOrgsHavePremiumSupport and
hasPremiumSupport access cloud-only billingPlanDetails on every render and will
throw on self-hosted; guard these behind the isCloud flag and use defensive
optional chaining on $organizationList and team objects. Update the
allOrgsHavePremiumSupport expression (and any use of $organizationList) to first
check isCloud and that $organizationList?.teams is an array, e.g., short-circuit
to false when not cloud, and change the team access to optional chain into
billingPlanDetails?.premiumSupport; likewise compute hasPremiumSupport as
isCloud ? ($currentPlan?.premiumSupport ?? allOrgsHavePremiumSupport) : false so
self-hosted renders never dereference billingPlanDetails.
🪄 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: 5dfbd2e0-4194-49ee-bab0-d6462370abb8

📥 Commits

Reviewing files that changed from the base of the PR and between bf51179 and 7e0df1e.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/+layout.svelte

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (3)
src/routes/(console)/project-[region]-[project]/+layout.svelte (3)

206-218: ⚠️ Potential issue | 🟡 Minor

Overlay z-index is below the progress tray.

project-layout__overlay uses z-index: 5 (line 209), but .layout-level-progress-bars uses z-index: 100 (line 248). Active upload/export/backup boxes will render above the blocked overlay, potentially exposing reachable controls.

🔧 Proposed fix
     .project-layout__overlay {
         position: fixed;
         inset: 48px 0 0 0;
-        z-index: 5;
+        z-index: 101;
         display: flex;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte around lines
206 - 218, Overlay (.project-layout__overlay) has z-index: 5 which is lower than
.layout-level-progress-bars (z-index: 100), allowing progress boxes to sit above
the blocked overlay; update the overlay's stacking so it sits above the progress
tray by increasing its z-index to be greater than .layout-level-progress-bars
(or use a shared stacking variable/constant) and ensure pointer-events remain
enabled so underlying controls stay blocked; modify the .project-layout__overlay
rule to use the new higher z-index value (or variable) so it consistently
overlays .layout-level-progress-bars.

61-134: ⚠️ Potential issue | 🟠 Major

Command center navigation remains active when project is blocked.

The registerCommands and registerSearchers calls (lines 61-134) don't check isProjectBlocked. Users can still navigate to blocked project areas via Cmd/Ctrl+K even though the overlay is shown.

🔧 Proposed fix — disable commands when blocked
     $: $registerCommands([
         {
             label: 'Go to Auth',
             callback: () => {
                 goto(`${base}/project-${$project.region}-${$project.$id}/auth`);
             },
             keys: ['g', 'a'],
-            group: 'navigation'
+            group: 'navigation',
+            disabled: isProjectBlocked
         },
         {
             label: 'Go to Databases',
             callback: () => {
                 goto(`${base}/project-${$project.region}-${$project.$id}/databases`);
             },
             keys: ['g', 'd'],
             group: 'navigation',
-            disabled: !$canSeeDatabases
+            disabled: !$canSeeDatabases || isProjectBlocked
         },
         // ... apply same pattern to all commands

Also guard the searchers:

-    $registerSearchers(userSearcher, teamSearcher, dbSearcher, functionsSearcher, bucketSearcher);
+    if (!isProjectBlocked) {
+        $registerSearchers(userSearcher, teamSearcher, dbSearcher, functionsSearcher, bucketSearcher);
+    }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte around lines
61 - 134, The command and search registrations ($registerCommands and
$registerSearchers) are executed even when isProjectBlocked is true, allowing
navigation via Cmd/Ctrl+K into blocked areas; change the code to early-guard
these calls by checking isProjectBlocked and either skip registering
commands/searchers or mark all commands disabled when isProjectBlocked is true
(update each command object used in $registerCommands to set disabled: true when
isProjectBlocked, and avoid calling $registerSearchers or pass an empty list
when blocked) so the command center and searchers are inert for blocked
projects; touch the block that builds the array passed to $registerCommands and
the call to $registerSearchers to implement this guard.

42-45: ⚠️ Potential issue | 🔴 Critical

Guard billingPlanDetails access for self-hosted deployments.

billingPlanDetails is cloud-only. This code will throw on self-hosted instances because $organizationList.teams is accessed unconditionally, and billingPlanDetails.premiumSupport is dereferenced without optional chaining.

🔧 Proposed fix
-    $: allOrgsHavePremiumSupport = $organizationList.teams.every(
-        (team) => (team as Models.Organization).billingPlanDetails.premiumSupport
-    );
-    $: hasPremiumSupport = $currentPlan?.premiumSupport ?? allOrgsHavePremiumSupport ?? false;
+    $: allOrgsHavePremiumSupport =
+        isCloud &&
+        ($organizationList?.teams?.length ?? 0) > 0 &&
+        $organizationList.teams.every(
+            (team) => (team as Models.Organization).billingPlanDetails?.premiumSupport
+        );
+    $: hasPremiumSupport =
+        isCloud && ($currentPlan?.premiumSupport ?? allOrgsHavePremiumSupport ?? false);

Based on learnings: billingPlanDetails is cloud-only in the Appwrite Console, so Svelte components should guard that access with isCloud or defensive optional chaining.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte around lines
42 - 45, The current reactive statements allOrgsHavePremiumSupport and
hasPremiumSupport dereference billingPlanDetails on every team which is
cloud-only and will throw on self-hosted; update the logic in the reactive block
for allOrgsHavePremiumSupport to defensively check that $organizationList?.teams
exists and each team has billingPlanDetails (use optional chaining like
team?.billingPlanDetails?.premiumSupport or guard with an isCloud flag) and then
compute hasPremiumSupport as $currentPlan?.premiumSupport ??
allOrgsHavePremiumSupport ?? false so that self-hosted deployments never access
billingPlanDetails unguarded.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@src/routes/`(console)/project-[region]-[project]/+layout.svelte:
- Around line 206-218: Overlay (.project-layout__overlay) has z-index: 5 which
is lower than .layout-level-progress-bars (z-index: 100), allowing progress
boxes to sit above the blocked overlay; update the overlay's stacking so it sits
above the progress tray by increasing its z-index to be greater than
.layout-level-progress-bars (or use a shared stacking variable/constant) and
ensure pointer-events remain enabled so underlying controls stay blocked; modify
the .project-layout__overlay rule to use the new higher z-index value (or
variable) so it consistently overlays .layout-level-progress-bars.
- Around line 61-134: The command and search registrations ($registerCommands
and $registerSearchers) are executed even when isProjectBlocked is true,
allowing navigation via Cmd/Ctrl+K into blocked areas; change the code to
early-guard these calls by checking isProjectBlocked and either skip registering
commands/searchers or mark all commands disabled when isProjectBlocked is true
(update each command object used in $registerCommands to set disabled: true when
isProjectBlocked, and avoid calling $registerSearchers or pass an empty list
when blocked) so the command center and searchers are inert for blocked
projects; touch the block that builds the array passed to $registerCommands and
the call to $registerSearchers to implement this guard.
- Around line 42-45: The current reactive statements allOrgsHavePremiumSupport
and hasPremiumSupport dereference billingPlanDetails on every team which is
cloud-only and will throw on self-hosted; update the logic in the reactive block
for allOrgsHavePremiumSupport to defensively check that $organizationList?.teams
exists and each team has billingPlanDetails (use optional chaining like
team?.billingPlanDetails?.premiumSupport or guard with an isCloud flag) and then
compute hasPremiumSupport as $currentPlan?.premiumSupport ??
allOrgsHavePremiumSupport ?? false so that self-hosted deployments never access
billingPlanDetails unguarded.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3e3adaed-65ee-4333-acf1-f1d4b53b9fc9

📥 Commits

Reviewing files that changed from the base of the PR and between 7e0df1e and dc06bf6.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/+layout.svelte

@HarshMN2345 HarshMN2345 merged commit 1e4082c into main Mar 26, 2026
4 checks passed
@HarshMN2345 HarshMN2345 deleted the feat-blocked-projects branch March 26, 2026 12:38
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