From 9073f443478153a1eddc5781f6a52dd3ee0ab4e0 Mon Sep 17 00:00:00 2001 From: Ryuz Date: Sat, 24 Oct 2026 19:12:35 +0200 Subject: [PATCH 1/3] Console menus above cards; invite codes only for invite joiners --- crates/outer/src/auth/mod.rs | 5 ++++- crates/outer/src/auth/tests.rs | 8 +++++--- web/docs/sign-in.mdx | 5 +++-- web/pages/console/console.css | 12 ++++++++++++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/crates/outer/src/auth/mod.rs b/crates/outer/src/auth/mod.rs index d8cf8bb..cd80ce3 100644 --- a/crates/outer/src/auth/mod.rs +++ b/crates/outer/src/auth/mod.rs @@ -493,7 +493,10 @@ pub async fn verify_code_core( }); } } - if !is_admin(cfg, &email) { + // Only people who joined with an invite get codes to pass on + // (owner, 2026-10-24): not admins, not allowlisted emails, and + // not app collaborators, who are admitted through the allowlist. + if carried_invite.is_some() && !is_admin(cfg, &email) { invites::mint_grants(&mut tx, &id, now) .await .map_err(|err| AuthError::new("db", format!("{err}")))?; diff --git a/crates/outer/src/auth/tests.rs b/crates/outer/src/auth/tests.rs index a1fced5..94ab5f6 100644 --- a/crates/outer/src/auth/tests.rs +++ b/crates/outer/src/auth/tests.rs @@ -1424,9 +1424,11 @@ async fn closed_beta_waitlists_by_default() { .unwrap(); } -/// A fresh account mints exactly 3 grant codes; an admin account mints none. +/// Codes go only to people who joined with an invite: an account admitted +/// any other way (open sign-up, the allowlist — how app collaborators get +/// in) and an admin mint none. The invite round trip below pins the 3. #[tokio::test] -async fn fresh_account_gets_three_grants_admin_gets_none() { +async fn only_invite_joiners_get_grants() { let pool = test_pool().await; let (config, codes) = test_config(); @@ -1448,7 +1450,7 @@ async fn fresh_account_gets_three_grants_admin_gets_none() { .fetch_one(&pool) .await .unwrap(); - assert_eq!(ana_grants, 3); + assert_eq!(ana_grants, 0, "no invite, no codes to pass on"); let (owner_grants,): (i64,) = sqlx::query_as( "SELECT COUNT(*) FROM invite_code WHERE createdBy = \ (SELECT id FROM user WHERE email = 'owner@example.com')", diff --git a/web/docs/sign-in.mdx b/web/docs/sign-in.mdx index 20844f3..9a9f9f4 100644 --- a/web/docs/sign-in.mdx +++ b/web/docs/sign-in.mdx @@ -30,8 +30,9 @@ After sign-in, `sign_in` and `verify_code` disappear from the tool list. ## Invite codes -Every new account gets 3 invite codes to share (`OUTER-XXXX-XXXX`, shown on -the console's Invites page). A code admits one new account and is spent when +Everyone who joins with an invite code gets 3 codes of their own to share +(`OUTER-XXXX-XXXX`, shown on the console's Invites page). App collaborators +and allowlisted emails get in without a code and get none. A code admits one new account and is spent when that account signs in — allowlisted and existing emails never burn one. Admins generate codes in bulk from the console's Admin page instead of getting automatic ones. diff --git a/web/pages/console/console.css b/web/pages/console/console.css index 8411110..72b0189 100644 --- a/web/pages/console/console.css +++ b/web/pages/console/console.css @@ -157,6 +157,11 @@ body { border-radius: var(--radius-box); padding: 10px 0; min-height: calc(100dvh - 24px); + /* `sticky` makes the rail its own stacking context, so its dropdowns and + tooltips (daisyUI z-index 999/2) only stack inside it. Without a z-index + the later, positioned cards (`.card` is `position: relative`) paint over + them and the menus open invisibly behind the content. */ + z-index: 20; } .rail-apps { @@ -440,3 +445,10 @@ a.rail-tile:hover { .side .menu :where(li > a.menu-active) { @apply bg-base-200 text-base-content font-medium; } + +/* The mobile drawer still covers the rail (rail z-index 20 > daisyUI's 10). */ +@media (max-width: 767px) { + .drawer-side { + z-index: 30; + } +} From e0538d551fa972f6c14b0c54123fe138a28fda77 Mon Sep 17 00:00:00 2001 From: Ryuz Date: Sat, 24 Oct 2026 19:14:53 +0200 Subject: [PATCH 2/3] Console account menu opens upward from the avatar --- web/pages/console/_islands/console.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pages/console/_islands/console.tsx b/web/pages/console/_islands/console.tsx index c49d6ba..8060a3b 100644 --- a/web/pages/console/_islands/console.tsx +++ b/web/pages/console/_islands/console.tsx @@ -784,7 +784,7 @@ export function Console() { -
+