Skip to content

feat: add auto-archive timeout setting#279

Draft
webwww123 wants to merge 1 commit intotiann:mainfrom
webwww123:feat/session-auto-archive-timeout
Draft

feat: add auto-archive timeout setting#279
webwww123 wants to merge 1 commit intotiann:mainfrom
webwww123:feat/session-auto-archive-timeout

Conversation

@webwww123
Copy link

Summary

Adds a minimal web-only auto-archive timeout for active sessions.

What changed

  • adds an Auto-Archive Timeout setting in the web Settings page
  • stores the timeout in localStorage
  • automatically archives active sessions after they stay idle past the selected timeout
  • skips auto-archiving while a session is still thinking or waiting on permission requests
  • adds settings page tests for the new preference

Implementation notes

This keeps the change intentionally small:

  • no protocol changes
  • no hub schema changes
  • no production deployment behavior changes unless a user enables the setting in the web UI

Idle detection uses the existing session summary state and the current archive API.

Closes #278

Validation

docker run --rm -v "/root/sandbox/hapi-pr:/workspace:ro" oven/bun:1 sh -lc "cp -a /workspace /tmp/hapi-pr && cd /tmp/hapi-pr/web && bun install && bunx vitest run src/routes/settings/index.test.tsx && bun run typecheck"

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.

Add configurable auto-archive timeout for idle sessions

1 participant