Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { Route as CookiesRouteImport } from './routes/cookies'
import { Route as AdminRouteImport } from './routes/admin'
import { Route as IndexRouteImport } from './routes/index'
import { Route as GroupsIndexRouteImport } from './routes/groups/index'
import { Route as PrototypeActiveScopeRouteImport } from './routes/prototype/active-scope'
import { Route as GroupsGroupSlugRouteImport } from './routes/groups/$groupSlug'
import { Route as FestivalsFestivalSlugRouteImport } from './routes/festivals/$festivalSlug'
import { Route as AdminFestivalsRouteImport } from './routes/admin/festivals'
Expand Down Expand Up @@ -71,6 +72,11 @@ const GroupsIndexRoute = GroupsIndexRouteImport.update({
path: '/groups/',
getParentRoute: () => rootRouteImport,
} as any)
const PrototypeActiveScopeRoute = PrototypeActiveScopeRouteImport.update({
id: '/prototype/active-scope',
path: '/prototype/active-scope',
getParentRoute: () => rootRouteImport,
} as any)
const GroupsGroupSlugRoute = GroupsGroupSlugRouteImport.update({
id: '/groups/$groupSlug',
path: '/groups/$groupSlug',
Expand Down Expand Up @@ -227,6 +233,7 @@ export interface FileRoutesByFullPath {
'/admin/festivals': typeof AdminFestivalsRouteWithChildren
'/festivals/$festivalSlug': typeof FestivalsFestivalSlugRouteWithChildren
'/groups/$groupSlug': typeof GroupsGroupSlugRoute
'/prototype/active-scope': typeof PrototypeActiveScopeRoute
'/groups': typeof GroupsIndexRoute
'/admin/artists/duplicates': typeof AdminArtistsDuplicatesRoute
'/admin/festivals/$festivalSlug': typeof AdminFestivalsFestivalSlugRouteWithChildren
Expand Down Expand Up @@ -259,6 +266,7 @@ export interface FileRoutesByTo {
'/admin/artists': typeof AdminArtistsRouteWithChildren
'/admin/festivals': typeof AdminFestivalsRouteWithChildren
'/groups/$groupSlug': typeof GroupsGroupSlugRoute
'/prototype/active-scope': typeof PrototypeActiveScopeRoute
'/groups': typeof GroupsIndexRoute
'/admin/artists/duplicates': typeof AdminArtistsDuplicatesRoute
'/admin/festivals/$festivalSlug': typeof AdminFestivalsFestivalSlugRouteWithChildren
Expand Down Expand Up @@ -292,6 +300,7 @@ export interface FileRoutesById {
'/admin/festivals': typeof AdminFestivalsRouteWithChildren
'/festivals/$festivalSlug': typeof FestivalsFestivalSlugRouteWithChildren
'/groups/$groupSlug': typeof GroupsGroupSlugRoute
'/prototype/active-scope': typeof PrototypeActiveScopeRoute
'/groups/': typeof GroupsIndexRoute
'/admin/artists/duplicates': typeof AdminArtistsDuplicatesRoute
'/admin/festivals/$festivalSlug': typeof AdminFestivalsFestivalSlugRouteWithChildren
Expand Down Expand Up @@ -327,6 +336,7 @@ export interface FileRouteTypes {
| '/admin/festivals'
| '/festivals/$festivalSlug'
| '/groups/$groupSlug'
| '/prototype/active-scope'
| '/groups'
| '/admin/artists/duplicates'
| '/admin/festivals/$festivalSlug'
Expand Down Expand Up @@ -359,6 +369,7 @@ export interface FileRouteTypes {
| '/admin/artists'
| '/admin/festivals'
| '/groups/$groupSlug'
| '/prototype/active-scope'
| '/groups'
| '/admin/artists/duplicates'
| '/admin/festivals/$festivalSlug'
Expand Down Expand Up @@ -391,6 +402,7 @@ export interface FileRouteTypes {
| '/admin/festivals'
| '/festivals/$festivalSlug'
| '/groups/$groupSlug'
| '/prototype/active-scope'
| '/groups/'
| '/admin/artists/duplicates'
| '/admin/festivals/$festivalSlug'
Expand Down Expand Up @@ -421,6 +433,7 @@ export interface RootRouteChildren {
TermsRoute: typeof TermsRoute
FestivalsFestivalSlugRoute: typeof FestivalsFestivalSlugRouteWithChildren
GroupsGroupSlugRoute: typeof GroupsGroupSlugRoute
PrototypeActiveScopeRoute: typeof PrototypeActiveScopeRoute
GroupsIndexRoute: typeof GroupsIndexRoute
}

Expand Down Expand Up @@ -468,6 +481,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof GroupsIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/prototype/active-scope': {
id: '/prototype/active-scope'
path: '/prototype/active-scope'
fullPath: '/prototype/active-scope'
preLoaderRoute: typeof PrototypeActiveScopeRouteImport
parentRoute: typeof rootRouteImport
}
'/groups/$groupSlug': {
id: '/groups/$groupSlug'
path: '/groups/$groupSlug'
Expand Down Expand Up @@ -815,6 +835,7 @@ const rootRouteChildren: RootRouteChildren = {
TermsRoute: TermsRoute,
FestivalsFestivalSlugRoute: FestivalsFestivalSlugRouteWithChildren,
GroupsGroupSlugRoute: GroupsGroupSlugRoute,
PrototypeActiveScopeRoute: PrototypeActiveScopeRoute,
GroupsIndexRoute: GroupsIndexRoute,
}
export const routeTree = rootRouteImport
Expand Down
51 changes: 51 additions & 0 deletions src/routes/prototype/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Prototype: active-scope

Route: `/prototype/active-scope?variant=A|B|C`

## Question

Does the "scope pin lives in Settings, header dropdown is a transient override"
model feel right, before touching `profiles` schema or real app code?

Background: PR #273 (issue #124) patched a bug where `profiles.active_group_id`
being `NULL` was overloaded to mean both "never chosen" and "explicitly
Everyone." The grill session (see conversation) converged on a bigger reframe:
Active Group and the future Vote Scope toggle (#125) are the same underlying
concept — a flat "scope" with entries `{your groups... | Everyone | Me}` — and
the fix should be root-cause, not another flag. Votes have no `group_id`
(confirmed in `supabase/migrations/20250620065433_create_artists_table.sql`),
so groups are purely a viewing/aggregation lens, never an identity a vote is
recorded against.

Product constraint from the user: the app should still centralize around "your
crew" as the default/sticky experience (that's the whole point of this epic),
so friction should sit on the _pin_ action (in Settings), not on casual
switching in the header.

## Variants

- **A — Star-marked dropdown**: one flat dropdown, pinned entry gets a star,
a "back to X" pill appears next to the trigger when overridden.
- **B — Two-row split**: "Your default" (always-visible, one click home) is
separated from a "Browse" dropdown for everything else.
- **C — Segmented + drawer**: a two-way segmented control (pinned vs. "More"),
with other scopes revealed as chips only on demand — makes the pinned crew
the single most prominent affordance, at the cost of one extra click to
reach Everyone/Me.

## Verdict

**Variant A won** — a single flat dropdown, plus the two independent Settings
controls (Active group, Active scope). Refinement on top of the original A:
the pinned scope now always sorts to the **top of the dropdown list** (still
starred), so reverting to it never requires hunting through groups/Everyone/Me
in their natural order — it's always the first row. Variants B and C did not
win; their code is left in place for reference only, not as live alternatives.

## Cleanup

Delete this whole `src/routes/prototype/` directory once the winning
interaction (Variant A + pinned-to-top ordering + the two Settings controls)
is folded into the real `ActiveGroupSwitcher` + a new Settings section, per
PR #273's branch. PR #288 (this prototype) is throwaway and will not be
merged to `main`.
Loading