Skip to content

Conversation

@HarshMN2345
Copy link
Member

@HarshMN2345 HarshMN2345 commented Nov 12, 2025

What does this PR do?

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
    • Enhanced deployment views with additional provider information including repository details (URL, owner, name), branch information (name and URL), and commit details (message, hash, and URL) across functions, sites, and deployments sections.

@appwrite
Copy link

appwrite bot commented Nov 12, 2025

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

GraphQL API works alongside REST and WebSocket protocols

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Three page route files are updated to expand deployment query selections. The select() calls in listDeployments queries are modified to include additional provider-related metadata fields: providerRepositoryUrl, providerRepositoryOwner, providerRepositoryName, providerBranchUrl, providerBranch, providerCommitMessage, providerCommitHash, and providerCommitUrl. Previously, only resourceId (or a minimal set of fields) was retrieved. No signatures, control flow, or error handling are altered.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Consistency check: Verify that all three files apply the identical field additions to their respective deployment queries
  • Field validation: Confirm that the added provider-related fields are appropriate and used (or will be used) by the consuming components
  • Data availability: Ensure the backend query supports these additional fields without introducing performance regressions

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding git details to deployment list queries across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-SER-467-git-details-not-showing

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.

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts (1)

33-48: Add provider fields to the second deployment query to display Git information in the rollback modal.

The second query (lines 33-48) is missing provider fields that are accessed in the UI. In instantRollbackModal.svelte (lines 177-180), the component renders prodDeployment?.providerCommitAuthorUrl and prodDeployment?.providerCommitAuthor, but these fields are not included in the Query.select() for the prodReadyDeployments query. This causes these values to be undefined in the rollback modal.

Add providerCommitAuthorUrl and providerCommitAuthor to the second query's select array:

Query.select([
    'buildDuration',
    'totalSize',
    'sourceSize',
    'buildSize',
    'type',
    'resourceId',
    'providerCommitAuthorUrl',
    'providerCommitAuthor'
])
🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.ts (1)

32-40: Provider fields added correctly, but consider extracting to a constant.

The addition of provider-related metadata fields enables git details to be displayed in the UI, addressing the PR objective.

However, the same 8-field list is duplicated across multiple files. Consider extracting it to a shared constant:

// In a shared constants file (e.g., $lib/constants.ts)
export const DEPLOYMENT_PROVIDER_FIELDS = [
    'providerRepositoryUrl',
    'providerRepositoryOwner',
    'providerRepositoryName',
    'providerBranchUrl',
    'providerBranch',
    'providerCommitMessage',
    'providerCommitHash',
    'providerCommitUrl'
] as const;

Then use it in the query:

                Query.select([
                    'buildSize',
                    'sourceSize',
                    'totalSize',
                    'buildDuration',
                    'status',
                    'type',
-                    'resourceId',
-                    'providerRepositoryUrl',
-                    'providerRepositoryOwner',
-                    'providerRepositoryName',
-                    'providerBranchUrl',
-                    'providerBranch',
-                    'providerCommitMessage',
-                    'providerCommitHash',
-                    'providerCommitUrl'
+                    'resourceId',
+                    ...DEPLOYMENT_PROVIDER_FIELDS
                ]),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e5877d and bed00b2.

📒 Files selected for processing (3)
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.ts (1 hunks)
  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts (1 hunks)
  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e
🔇 Additional comments (2)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts (1)

18-30: Provider fields added correctly to the first deployment query.

The expansion of selected fields enables git details to be displayed for recent deployments.

src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.ts (1)

44-52: Provider fields added correctly for function deployments.

The addition of provider-related metadata fields enables git details to be displayed for function deployments, consistent with the changes made for site deployments.

As with the other files, consider extracting this field list to a shared constant (see comment on deployments/+page.ts) to reduce duplication and ensure consistency.

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