Skip to content

feat(webui): smart-redirect / based on onboarding sentinel (#1599)#1602

Merged
nextlevelshit merged 1 commit into
mainfrom
1599-entry-page-branch
Apr 30, 2026
Merged

feat(webui): smart-redirect / based on onboarding sentinel (#1599)#1602
nextlevelshit merged 1 commit into
mainfrom
1599-entry-page-branch

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

Summary

  • GET / now 302-redirects to /onboard when .agents/.onboarding-done sentinel is missing, otherwise to /work
  • Removes legacy default landing on /runs
  • Adds round-trip test coverage for both redirect paths via tmp fixtures

Related to #1599

Changes

  • internal/webui/handlers_root.go — new root handler with sentinel-based branching
  • internal/webui/routes.go — wire root handler, drop /runs default
  • internal/webui/handlers_root_test.go — sentinel present/absent round-trip tests
  • specs/1599-entry-page-branch/ — spec, plan, tasks

Test Plan

  • go test ./internal/webui/... covers both redirect targets
  • Manual: hit / with and without .agents/.onboarding-done present

Replace static GET /{$} -> /runs redirect with sentinel-aware handler.
If .agents/.onboarding-done exists under repoDir, redirect / -> /work;
otherwise redirect / -> /onboard. Stat errors fall through to /onboard
as the safer default. Reuses onboarding.SentinelFile and the existing
serverRuntime.repoDir populated from git rev-parse --show-toplevel.

Adds handlers_root_test.go with t.TempDir fixtures covering both
branches plus an empty-repoDir fallback case.
@nextlevelshit nextlevelshit merged commit aedad94 into main Apr 30, 2026
15 checks passed
@nextlevelshit nextlevelshit deleted the 1599-entry-page-branch branch April 30, 2026 01:06
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.

1 participant