# fix\(web\): stop drawer and panel terminals from allocating the same id · stienswout/t3code

[View on GitCafe](https://git.cafe/stienswout/t3code/commit/2d2e6c5089c7dccac23256159b6c5a13b1a885aa)

Repository: [stienswout/t3code](https://git.cafe/stienswout/t3code)

Visibility: public

Requested revision: 2d2e6c5089c7dccac23256159b6c5a13b1a885aa

Requested commit: 2d2e6c5089c7dccac23256159b6c5a13b1a885aa

Commit: 2d2e6c5089c7dccac23256159b6c5a13b1a885aa

Tree: f2a891371949196b901720a7008e706e092c448f

Author: Wout Stiens

Committer: Wout Stiens

## Message

```
fix(web): stop drawer and panel terminals from allocating the same id

Terminal sessions are keyed by (threadId, terminalId) and ids are
client-allocated, but the drawer seeded its allocator from the
server-known sessions with panel terminals filtered out, while other
call sites ignored panel ids or freshly opened local ids the server
does not know yet. A drawer terminal could therefore mint the id of an
existing panel terminal (deterministically when the drawer was empty),
attaching two viewports to one PTY that mirrored each other.

Every allocator now seeds from the union of server-known ids, the
drawer's local UI-state ids, and the right panel's surface ids, via one
allocatable-ids memo per scope.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [5da6b1f049d927cf00dba43788f7452075d3bb39](https://git.cafe/stienswout/t3code/commit/5da6b1f049d927cf00dba43788f7452075d3bb39?format=markdown)

[Source at this commit](https://git.cafe/stienswout/t3code/tree/2d2e6c5089c7dccac23256159b6c5a13b1a885aa?format=markdown)
