Skip to content

Disable Activity Bump field in UI when Default TTL is 0 #21703

@blinkagent

Description

@blinkagent

Problem

When an admin sets Default TTL to 0 (disabling autostop), the Activity Bump field remains editable in the template scheduling UI. This is confusing and dangerous because:

  1. Activity Bump has no effect when there's no deadline to extend
  2. Admins may set both Default TTL=0 and Activity Bump=0 thinking they're "fully disabling" autostop
  3. This creates a dangerous state: existing running workspaces still have their old deadlines, but can no longer extend them via activity (see Warn template admins that autostop/activity_bump changes don't affect running workspaces #21688)

Key Insight: Activity Bump is a Self-Healing Mechanism

When activity_bump > 0 and default_ttl=0, activity bumps actually clear the deadline on running workspaces. This is a safety mechanism - the bump logic applies the new TTL (0) which results in deadline=null.

But when admins set both activity_bump=0 AND default_ttl=0:

  • No bumps occur to "heal" the workspace
  • Existing deadline persists
  • Workspace autostops when the old deadline passes

Proposed Solution

When Default TTL is set to 0:

  • Disable or hide the Activity Bump field
  • Show a tooltip or helper text: "Activity bump only applies when a default TTL is configured. Leaving activity bump enabled allows running workspaces to clear their existing deadlines."

Alternatively, if Default TTL is set to 0, automatically set Activity Bump to a sensible default (e.g., 1 hour) rather than allowing 0.

Why This Helps

This is a minimally invasive way to reduce the chances of admins changing Activity Bump to 0 at the same time they disable autostop. By preserving activity_bump > 0, the self-healing mechanism remains active and running workspaces will naturally clear their deadlines on the next activity bump cycle.

It doesn't fully solve the underlying issue of existing workspaces retaining their deadlines (#21688), but it removes a common footgun from the UI and preserves the safety mechanism.

Related Issues


Created on behalf of @bjornrobertsson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions