Skip to content

Drive edit session timeout banner from used_on and dev_ttl_seconds#9389

Merged
ericpgreen2 merged 3 commits intomainfrom
ericgreen/accurate-edit-session-timeout-banner
May 6, 2026
Merged

Drive edit session timeout banner from used_on and dev_ttl_seconds#9389
ericpgreen2 merged 3 commits intomainfrom
ericgreen/accurate-edit-session-timeout-banner

Conversation

@ericpgreen2
Copy link
Copy Markdown
Contributor

@ericpgreen2 ericpgreen2 commented May 5, 2026

The edit session timeout banner previously approximated the hibernation time client-side as deployment.createdOn + 1h, which doesn't match the real backend behavior. The runtime hibernates a deployment when now - deployment.used_on > project.dev_ttl_seconds, but neither field was exposed on the admin API.

  • Expose Project.dev_ttl_seconds (proto field 27) and Deployment.used_on (proto field 14) on the admin API.
  • Populate them in projToDTO and deploymentToDTO.
  • Drive EditSessionTimeoutBanner from usedOn + devTtlSeconds instead of the hardcoded one-hour TTL; treat missing or zero TTL as "no banner".

Discussed in Slack.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

The banner previously approximated the hibernation time as
`deployment.created_on + 1 hour`, which drifts from the real backend
behavior (`used_on + project.dev_ttl_seconds`). Expose both fields on
the admin API and use them in the banner directly.
@ericpgreen2 ericpgreen2 self-assigned this May 5, 2026
…it-session-timeout-banner

# Conflicts:
#	proto/gen/rill/admin/v1/api.pb.go
@ericpgreen2 ericpgreen2 marked this pull request as ready for review May 6, 2026 14:11
@ericpgreen2 ericpgreen2 requested review from a team as code owners May 6, 2026 14:11
Copy link
Copy Markdown
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backend LGTM

@ericpgreen2 ericpgreen2 merged commit cdcc7c6 into main May 6, 2026
14 of 15 checks passed
@ericpgreen2 ericpgreen2 deleted the ericgreen/accurate-edit-session-timeout-banner branch May 6, 2026 14:42
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.

3 participants