Skip to content

feat(console): add a top banner for the new Console - #3192

Merged
HarshMN2345 merged 2 commits into
mainfrom
feat-new-console-top-banner
Sep 1, 2026
Merged

feat(console): add a top banner for the new Console#3192
HarshMN2345 merged 2 commits into
mainfrom
feat-new-console-top-banner

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

Adds a top banner inviting users to the new Console, alongside the promo card from #3191.

Approach

Uses GradientBanner — the same component newDevUpgradePro uses for the Cloud credits promo. Registered through headerAlert at importance 1, the promo tier, so it sits level with newDevUpgradePro and the backup-policy warning and can never outrank a payment or usage alert. Dismissal is keyed on the alert id in localStorage, matching newDevUpgradePro.

File Change
src/lib/components/newConsoleBanner.svelte New, 44 lines
src/routes/(console)/+layout.svelte Registration, +14
src/lib/components/billing/gradientBanner.svelte Layering fix, +17/-1

Also fixes a pre-existing layering bug

GradientBanner is position: fixed and offsets the shell itself in setNavigationHeight. But it renders inside AlertStack, which is also fixed and measures its children to do the same job. Because the banner was out of flow, the stack measured 0px and its ResizeObserver fired last, resetting header.style.top = 0 — so the banner covered the navigation until the next resize.

Measured on first paint, before and after:

before after
banner position fixed relative
AlertStack height 0px 56px
header.top 0px 56px
overlaps navbar yes no

The fix mirrors headerAlert.svelte — read getContext('isInAlertStack') and stand down when the stack is in charge. This also fixes the same first-paint overlap for newDevUpgradePro and enterpriseTrial, which both go through the same path.

Copy

Introducing the new Appwrite Console, rebuilt from the ground up.
[ Try it now ]

CTA carries utm_medium=banner, so this surface can be compared against the card's utm_medium=promo_card in the sources pipeline.

Worth noting

With #3191 merged, the banner and the promo card both run and say the same thing on the same page. That's a deliberate call, not an oversight — flagging it so it's a decision rather than a surprise.

Test plan

  • bun run format — clean
  • bun run lint — 0 errors
  • bun run check — no errors in changed files
  • Verified against the live console: banner renders above the navigation, no overlap on first paint
  • Verified dismissal persists

Uses GradientBanner, the same component newDevUpgradePro uses, registered
through headerAlert at importance 1 so it sits in the promo tier and can
never outrank a payment or usage warning. Dismissal is keyed on the alert
id in localStorage, matching newDevUpgradePro.

Also makes GradientBanner stack-aware. It is position:fixed and offsets the
shell itself, but AlertStack is fixed too and measures its children to do
the same job. Inside a stack the banner measured as 0, so the stack reset
the header offset the banner had just set and the banner covered the
navigation until the next resize. It now stands down when a stack is in
charge, mirroring headerAlert.svelte. This also fixes the same first-paint
overlap for newDevUpgradePro and enterpriseTrial.

The CTA carries utm_medium=banner so this surface can be compared against
the promo card.
@appwrite

appwrite Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Schedule functions to run as often as every minute with cron expressions

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a dismissible cloud-only banner promoting the new Appwrite Console and adjusts GradientBanner positioning when rendered inside the shared alert stack.

  • Registers the promotion in the console-wide header-alert system at importance 1.
  • Persists dismissal and deactivates the banner’s alert entry.
  • Delegates navigation offsets to AlertStack when GradientBanner is rendered inside it.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
src/lib/components/newConsoleBanner.svelte Adds the promotional banner, analytics, persistent dismissal, and alert-store deactivation.
src/routes/(console)/+layout.svelte Registers the cloud-only banner in the shared header-alert system using the promotional priority tier.
src/lib/components/billing/gradientBanner.svelte Makes GradientBanner participate in AlertStack layout flow and avoids competing shell-offset updates.
src/lib/components/index.ts Exports NewConsoleBanner through the shared components API.

Reviews (2): Last reviewed commit: "fix(console): release the header alert s..." | Re-trigger Greptile

Comment thread src/lib/components/newConsoleBanner.svelte Outdated
Comment thread src/routes/(console)/+layout.svelte Outdated
import { UsageRates } from '$lib/components/billing';
import { canSeeProjects } from '$lib/stores/roles';
import { BottomModalAlert } from '$lib/components';
import NewConsoleBanner from '$lib/components/newConsoleBanner.svelte';

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.

P2 Component imports bypass barrels

The new direct imports of newConsoleBanner.svelte here and billing/gradientBanner.svelte in the banner bypass the repository's required component barrel exports, weakening the centralized component API and making future relocation and export auditing harder.

Context Used: AGENTS.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/routes/(console)/+layout.svelte
Line: 48

Comment:
**Component imports bypass barrels**

The new direct imports of `newConsoleBanner.svelte` here and `billing/gradientBanner.svelte` in the banner bypass the repository's required component barrel exports, weakening the centralized component API and making future relocation and export auditing harder.

**Context Used:** AGENTS.md ([source](https://github.com/appwrite/console/blob/main/AGENTS.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

handleClose only hid the local component, leaving the store entry visible.
headerAlert.get() compares importance and breaks ties by registration
order, so the dismissed entry kept winning the importance-1 tie and
rendered an empty slot, hiding newDevUpgradePro and the backup policy
alert until a reload.

Now calls headerAlert.updateShow(id, false) so activeHeaderAlert
recomputes and the next eligible promo can take the slot. Verified: after
dismissal the AlertStack unmounts and the header offset returns to 0
rather than leaving an empty banner mounted.

Also routes NewConsoleBanner through the components barrel, per AGENTS.md.
@HarshMN2345
HarshMN2345 merged commit ca32b85 into main Sep 1, 2026
4 checks passed
@HarshMN2345
HarshMN2345 deleted the feat-new-console-top-banner branch September 1, 2026 14:41
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