Skip to content

Home's span switch sets the whole page #197

Opensyntaqx opened this feature

Home's span switch ("Since last visit", "Last 24 hours", "Last 7 days") sits in one section's header, so it reads as that section's alone. Make it the page's: move it to the top of Home (by the greeting and Ask box, or in the page header), and have every section read in the context of the chosen span. "Where you're needed", what it cost, what ran and what happened should all answer "in this window".

How it works now

  • WindowSwitch is in apps/web/app/routes/workspace/home.tsx (around line 410). Home was reworked in #167, so check its current place first.
  • The loader builds one span (spanFor(windowKey, now, lastSeen, tz) in apps/web/app/lib/home.ts). It already passes it to the digest, chat activity, landed, deploys, pushes, what g1t settled (loadSettled) and the spend card (loadSpend / SpendCard).
  • These aren't span-aware: Where you're needed (attention rows: waitingSentence and the NeededCard), Start here, Running now, and the head of the page.

What each section should do with a span

Decide each one and justify it in the pull request. These are starting points, not decisions:

  • Where you're needed stays "what needs you now", because it's a to-do list rather than history. It marks what became needed within the span (a "new" beside the row, or a "since …" group first), and its count sentence says so.
  • Spent shows the span's cost, labelled with the span. Keep the month-to-date figure beside it if budgets are set in that.
  • Running now stays live, with what finished in the span (passed, failed) beside it.
  • The top sentence and g1t's summary (What changed / Summarize) use the same span.
  • The choice is kept as it is today (a URL param and/or a cookie: check how windowKey is read) and can be shared by URL.

Also

  • The phone layout: the switch must fit at 375px.
  • The marketing Home tour in apps/web/app/components/product-tour.tsx (HomeMain mocks the page): move its switch the same way, so the marketing matches the product.
  • Docs: the guides that cover Home.

Verify live with real data in each span.


How to work on this repository

  • Claim this item before you start (g1t work claim <number>), and add G1t-Session: $G1T_SESSION to every commit.
  • Other sessions share the main checkout: work in a worktree of your own and stage only your own files.
  • Pushing to main deploys production, and pushes to main and release tags are the owner's. Land the work through a pull request on this item, or commit locally and hand the owner the exact git -C <path> push ….
  • Shipped means on main and deployed. Check it live with real data and look at the rendered pages: a status code doesn't show it works.
  • Docs ship in the same change as the feature (guides, reference, llms.txt), to a high standard.
  • User-facing text never names other products or compares g1t to them. Internal notes and code comments may.

Repositories

Suggested

Repositories it may also need, and why.

  • hello8 work items with the same labels landed there.
  • automation-lab2 work items with the same labels landed there.

Nobody has worked on this yet

Point your own agent at flagon-io#197.

Discussion

syntaqxmoved this from Triage to Next·

Sign in to comment.