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
    • Deployment lists in Functions, Sites, and Deployments views now show expanded provider metadata: repository details (URL, owner, name), branch info (name, URL), and commit details (message, hash, URL). This provides richer context for each deployment without changing behavior or error handling.

✏️ Tip: You can customize this high-level summary in your review settings.

@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

HTTPS and SSL certificates are handled automatically for all your Sites

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Three page route files were changed to expand the fields returned by deployment queries. The select() calls in their listDeployments (or equivalent) queries were extended to include provider-related metadata fields: providerRepositoryUrl, providerRepositoryOwner, providerRepositoryName, providerBranchUrl, providerBranch, providerCommitMessage, providerCommitHash, and providerCommitUrl in addition to the previously selected fields (e.g., resourceId, status, type). No control flow, error handling, or exported/public signatures were modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Confirm all three files apply the same field additions consistently.
  • Verify consuming code/components expect and correctly handle the added fields.
  • Check that the backend/query layer actually exposes these fields and that adding them won't cause unexpected performance regressions.
  • Files to spot-check:
    • src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.ts
    • src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts
    • src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.ts

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 PR title 'fix: include git details in deployments list queries' directly aligns with the changeset, which adds provider-related fields (git commit/branch/repository details) to deployment list queries across three 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

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bed00b2 and 4cc00c9.

📒 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)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.ts
  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.ts: Define types inline or in .d.ts files, avoid creating separate .types.ts files
Use TypeScript in non-strict mode; any type is tolerated in this project

Files:

  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts
src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Configure dynamic routes using SvelteKit convention with [param] syntax in route directory names

Files:

  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts
⏰ 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: e2e
  • GitHub Check: build
🔇 Additional comments (2)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts (2)

33-49: Confirm that excluding provider fields from the production metrics query is intentional.

The second deployment query fetches production-ready deployment metrics but doesn't include the new provider fields added to the first query. Given that this query specifically targets build metrics (buildDuration, totalSize, etc.) for activated deployments, this exclusion appears intentional. However, please confirm this is deliberate to ensure consistency across the codebase.


18-30: Field names verified against actual component usage — all provider fields are valid.

The 8 provider fields added to Query.select() are confirmed to be correct. The DeploymentSource.svelte component directly accesses all of these fields to display GitHub repository, branch, and commit information:

  • providerRepositoryUrl, providerRepositoryOwner, providerRepositoryName → displayed as GitHub repo link
  • providerBranchUrl, providerBranch → displayed as branch link
  • providerCommitMessage, providerCommitHash, providerCommitUrl → displayed as commit link (when all three are present)

The field selection is correct and necessary for the UI to function properly.


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.

@Meldiron Meldiron merged commit 6f76fbc into main Nov 26, 2025
4 checks passed
@Meldiron Meldiron deleted the fix-SER-467-git-details-not-showing branch November 26, 2025 13:21
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.

3 participants