Skip to content

fix(console): regional Projects API for service toggles + full ApiSer…#2976

Open
HarshMN2345 wants to merge 11 commits intomainfrom
fix-project-services-region-and-sdk-list
Open

fix(console): regional Projects API for service toggles + full ApiSer…#2976
HarshMN2345 wants to merge 11 commits intomainfrom
fix-project-services-region-and-sdk-list

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

@HarshMN2345 HarshMN2345 commented Apr 13, 2026

…vice list

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.)

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 13, 2026

Greptile Summary

This PR migrates service/webhook SDK calls to sdk.forProject(region, projectId) for regional routing, reverts project-services.ts to an explicit list (fixing the GraphQL label regression and adding Sites, TablesDB, and Migrations entries), adds a new Protocols UI card with enable/disable-all, and shows the signing secret on webhook creation.

  • P1: updateSecurity.svelte line 79 passes the literal string \"Placeholder\" as the description prop of the TLS checkbox — this text will be visible to users in the Settings page.
  • P2: updateProtocols.svelte uses Submit.ProjectService for all protocol toggle events (lines 59 and 97), conflating protocol and service analytics since no Submit.ProjectProtocol constant exists.

Confidence Score: 4/5

Safe to merge after fixing the "Placeholder" description text in updateSecurity.svelte, which will render as literal UI copy.

One P1 finding (literal "Placeholder" text exposed in UI) blocks a clean merge; the P2 analytics misattribution in updateProtocols.svelte should also be addressed but is not a functional breakage.

src/routes/(console)/project-[region]-[project]/settings/webhooks/[webhook]/updateSecurity.svelte (placeholder description text) and src/routes/(console)/project-[region]-[project]/settings/updateProtocols.svelte (analytics event name).

Important Files Changed

Filename Overview
src/lib/stores/project-services.ts Reverted to explicit hand-written list (fixes the GraphQL label regression); adds Sites, TablesDB, and Migrations entries; correctly sorted.
src/routes/(console)/project-[region]-[project]/settings/updateProtocols.svelte New protocols UI card with enable/disable-all; uses Submit.ProjectService for analytics tracking instead of a protocol-specific event — protocol events will be misattributed to services.
src/routes/(console)/project-[region]-[project]/settings/updateServices.svelte Migrated to sdk.forProject regional call; enable/disable-all UI with confirmation dialog; correct implementation.
src/routes/(console)/project-[region]-[project]/settings/webhooks/[webhook]/updateSecurity.svelte Migrated to regional sdk.forProject; contains literal "Placeholder" as the description prop on the TLS Selector.Checkbox, which will surface in production UI.
src/routes/(console)/project-[region]-[project]/settings/webhooks/create/+page.svelte Adds show-secret modal on webhook creation; correctly reads webhook.secret from the creation response and conditionally shows the modal.

Reviews (8): Last reviewed commit: "add enable and disable all to protocol u..." | Re-trigger Greptile

@HarshMN2345 HarshMN2345 requested a review from Meldiron April 13, 2026 15:16
HarshMN2345 and others added 2 commits April 13, 2026 20:50
Co-authored-by: Matej Bačo <matejbaco2000@gmail.com>
{ label: 'Functions', method: ApiService.Functions, value: null },
{ label: 'GraphQL', method: ApiService.Graphql, value: null },
{ label: 'Messaging', method: ApiService.Messaging, value: null }
] satisfies Service[]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are missing Migrations

Let's also ask AI to sort the list alphabetically

{
label: 'Messaging',
method: ApiService.Messaging,
value: project.serviceStatusForMessaging
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing migrations I think


try {
await sdk.forConsole.projects.updateServiceStatusAll({
await sdk.forConsoleIn($project.region).projects.updateServiceStatusAll({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We no longer have updateServiceStatusAll. We need to loop them, and do "updateServiceStatus".


try {
await sdk.forConsole.projects.updateServiceStatus({
await sdk.forConsoleIn($project.region).projects.updateServiceStatus({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need new SDK and use project SDK, not projects.

@HarshMN2345 HarshMN2345 requested a review from Meldiron April 14, 2026 08:57
<svelte:fragment slot="aside">
<div>
<Secret label="Key" copyEvent="signature" bind:value={$webhook.signatureKey} />
<Secret label="Key" copyEvent="signature" bind:value={$webhook.secret} />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can no longer read secret - you only see it once after creating it, or after updating it

@HarshMN2345 HarshMN2345 self-assigned this Apr 15, 2026
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