githubnext/ace2Public

Ace: a collaborative coding environment on the team's own machines

Archive inactive archives every idle channel, not only those shown as Inactive

IA

The sidebar's **Inactive** group and the **Archive inactive** action mean different things by "inactive". As a result, the action can archive recent channels that the sidebar shows under **Channels**, not **Inactive**.

## Source (origin/main `6dc0f1c`)

- **Sidebar classification.** [`apps/app/src/app.tsx` L98](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/app/src/app.tsx#L98) and [L221](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/app/src/app.tsx#L221): a channel is Inactive when it is `!busy` and its last activity (`active || created`) is more than 6 hours old. - **Archive action.** The **Channels** header's context menu offers "Archive inactive" ([`session-sidebar.tsx` L617](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/packages/ui/src/components/session-sidebar/session-sidebar.tsx#L617)). The app sends `archive-inactive` with the selected local checkout ([`app.tsx` L336](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/app/src/app.tsx#L336), [L423](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/app/src/app.tsx#L423)). - **Host behavior.** [`apps/host/src/manage.ts` L138–146](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/host/src/manage.ts#L138-L146) `archiveInactive(root)` archives every non-archived, non-busy channel in that root. It never checks last activity.

#157 (merged as `1cc3f90`) keeps both behaviors: it moves the classification into `projectGroups` and still sends only this host's checkout.

## Observed

From the solo browser validation of #157: - **Setup:** headless Chromium driving the real app on an isolated, disposable source host. - **Timing:** the channels were minutes old. - **Revealing Inactive:** only the browser clock was moved 7 hours ahead (Playwright `setFixedTime`), which made the sidebar show them under Inactive. The host's timestamps and listings were unchanged. - **Result:** **Archive inactive** reported "Archived 1 inactive channel". The host archived the first checkout's channel, `brisk-anchor`, which by the host's own clock was minutes old. The host archived it because it was idle, not because it was 6 hours old. - **Implication:** with a real clock, the same action archives every idle channel in the checkout, including ones shown under **Channels**.

## Decision needed

Choose the intended semantics; this issue doesn't pick one: 1. **Same threshold.** Archive inactive archives only what the Inactive group shows: idle for more than 6 hours, decided in one place shared by the host and the app. 2. **Label it accurately.** Keep archiving every non-busy channel, and make the action's label and confirmation say "all idle channels" instead of "inactive".

Dogfooding: #5.

  1. iamnbutlerreferenced this in [Meta] Dogfood Ace end to end #5last month on GitHub

  2. iamnbutlerparent-issue-addedlast month on GitHub

  3. iamnbutlerreferenced this in Verify Ace with two machines on the tailnet #10last month on GitHub