Skip to content

fix(console): show the server's release line on the page loader - #14547

Merged
ChiragAgg5k merged 2 commits into
mainfrom
fix/console-loader-version
Oct 15, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
fix/console-loader-version

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

The page loader in the console hardcoded / 2.0, so it still read 2.0 after the 2.5.0 release. It now shows the release line of the server it ships with.

  • Self-hosted docker-compose.yml passes _APP_VERSION (already in .env, written by the installer) to the console container as VITE_APPWRITE_VERSION.
  • VITE_APPWRITE_VERSION is part of the console runtime config (window.__APP_CONFIG__), so it is read at serve time and needs no console rebuild per release.
  • The loader shows major.minor (2.5.0 → 2.5, 2.5-nightly.<date> → 2.5) and hides the label when the version is unset or names no release (latest, local).

Cloud sets no VITE_APPWRITE_VERSION today, so the label is hidden there until the deployment sets it.

Test Plan

Ran the console dev server with VITE_APPWRITE_VERSION=2.5.0 and loaded /organizations with API requests held so the loader stays up. The loader reads / 2.5, and the SSR HTML carries "appwriteVersion":"2.5.0" in window.__APP_CONFIG__.

Loader showing / 2.5

Related PRs and Issues

None.

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

Closes #14548

The loader hardcoded / 2.0, so every release past 2.0 showed the wrong version. Self-hosted compose now passes _APP_VERSION to the console as VITE_APPWRITE_VERSION through the runtime config, and the loader shows its major.minor, hiding the label when no release is set.
@luxor-code-review

luxor-code-review Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Add VITE_APPWRITE_VERSION to the compose generator (composeData.ts:314) — The canonical docker-compose.yml adds VITE_APPWRITE_VERSION=${_APP_VERSION:-} to the appwrite-console service (docker-compose.yml:284), but the duplicated console block generated by composeData.ts still only sets VITE_CONSOLE_PROFILE and APPWRITE_ENDPOINT_SAME_ORIGIN.

This PR plumbs the Appwrite server version into the console's runtime config and renders it on the console loader, so self-hosted users can see which server version they're running. The compose file passes _APP_VERSION through to the console container, and the console reads it as a runtime env var and maps it into the shared runtime config used by the loader UI.

Files Change
docker-compose.yml Adds VITE_APPWRITE_VERSION=${_APP_VERSION:-} to the appwrite-console service environment
apps/console/src/lib/appwrite-version.ts, runtime-config-shared.ts, runtime-config.ts, debug-env-status.ts Adds the appwriteVersion runtime config key, its mapper, and debug-env exposure
apps/console/src/components/ui/loader.tsx Renders the version string as a small span on the loading screen
apps/console/.env.example Documents the new env var
apps/console/src/lib/docs/compose-generator/composeData.ts (context) Not changed in this PR, but mirrors the compose block and is now missing the new env entry

One low-severity consistency finding: the compose generator template was not updated to match docker-compose.yml, so generated compose files will not show the version display.

Reviewed commit: 757a5f6

@appwrite

appwrite Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

New Console

Project ID: new-console

Sites (1)
Site Status Logs Preview QR
 New Console
new-console
Ready Ready View Logs Preview URL QR Code

Tip

Environment variable changes require redeployment to take effect

@github-actions

Copy link
Copy Markdown

Security rules

No new WARNING or ERROR findings from security rules.

19 existing findings tracked in .semgrep/baseline.json
  • php.appwrite.guest-write-without-abuse-limit (12)
  • php.appwrite.secret-compare-timing (5)
  • php.appwrite.weak-secret-env-default (2)

Posted by Checks / Rules. Re-runs update this comment in place. Rule details and baseline: .semgrep/README.md.

@ghost

ghost commented Oct 15, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The PR adds an optional runtime-configured Appwrite server release line to the Console loader, deriving the displayed major.minor from the server version and wiring the value through self-hosted configuration. It also documents and surfaces the setting in the debug environment panel, and updates the docs Compose generator and checked-in data so generated installations receive the version.

Latest changes: The new commits make the docs Compose-data generator substitute the stable Appwrite version into empty-default version placeholders and update the checked-in generated Console service with VITE_APPWRITE_VERSION.

Verdict New comments Fixed Still open
✅ Approved 0 1 0
📂 Walkthrough · 9
File Change
apps/console/.env.example Documents the optional server-version environment variable.
apps/console/scripts/generate-compose-data.ts Pins the server version in generated Compose service blocks.
apps/console/src/components/ui/loader.tsx Displays the parsed release line in the loader.
apps/console/src/lib/appwrite-version.ts Extracts a major.minor release line from supported version strings.
apps/console/src/lib/debug-env-status.ts Reports the version variable in the runtime environment status panel.
apps/console/src/lib/docs/compose-generator/composeData.ts Includes the version environment variable in the generated Console Compose block.
apps/console/src/lib/runtime-config-shared.ts Reads the version into the shared runtime configuration.
apps/console/src/lib/runtime-config.ts Adds the version field to the empty runtime configuration.
docker-compose.yml Passes the configured server version to the self-hosted Console container.
✅ Fixed since the last review · 1
  • Generated Compose files do not receive this setting · docker-compose.yml:284

Reviewed the commits since 757a5f6 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Tier A · See the inline comments. Summary

Comment thread docker-compose.yml Resolved
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → fix/console-loader-version (after).

Metric Before After Change
🚀 Requests/sec 216.14 220.82 ⚪ +2.2%
⏱️ Latency P50 79.91 ms 78.86 ms ⚪ -1.3%
⏱️ Latency P95 182.87 ms 180.61 ms ⚪ -1.2%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 78.86 180.61 13,680 220.82 -2.25
Account 145.55 273.13 720 12.45 +8.44
TablesDB 76.51 145.5 7,440 124.18 +1.41
Storage 72.28 164.33 3,600 61.13 -18.11
Functions 111.48 214.41 1,920 33.24 +11.42

Top API waits (after)

API request Max wait (ms)
functions.create 426.79
account.name.update 395.33
account.prefs.update 377.26
storage.buckets.create 329.52
functions.delete 326.26

…se files

Compose files from the docs generator carry no _APP_VERSION in .env, so VITE_APPWRITE_VERSION would resolve empty and hide the loader's release line. The generator now pins it to the release, as it does the appwrite image.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit 64ab418 into main Oct 15, 2026
75 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/console-loader-version branch October 15, 2026 11:27
@ChiragAgg5k ChiragAgg5k mentioned this pull request Oct 21, 2026
6 tasks
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.

Show the server's release line on the page loader

1 participant