Release Codex Deck v0.6.3 - #5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f71d181196
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const completionAcknowledged = sessionStatus === "complete" && completionRevision != null && | ||
| acknowledgedCompletions.get(completionKey) === completionRevision; |
There was a problem hiding this comment.
Honor completion acknowledgements emitted by the owner
When a completion is opened on its rollout-owning host, CodexSessionOwnershipIndex.annotate() publishes it as status: "idle" while retaining completionRevision, but this condition only recognizes revisions whose session status remains "complete". In a two-host setup, a mirrored native candidate can therefore retain complete or unread, win the strongest selection, and keep the key green after an owner-side UI activation or Deck press. Treating an idle session with a revision as an already-acknowledged completion is necessary for that acknowledgement to cross the relay.
Useful? React with 👍 / 👎.
| const liveOrAttention = ["working", "thinking", "approval", "awaiting-approval", "awaiting-response", "unread", "error"]; | ||
| const completionLike = ["complete", "completed", "done"]; | ||
| const status = completionAcknowledged && completionLike.includes(strongest.status) | ||
| ? "idle" |
There was a problem hiding this comment.
Clear mirrored unread status after acknowledgement
When another host activates a completed thread whose strongest mirrored native status is unread, the acknowledgement is recorded but this branch only converts complete, completed, or done to idle. Since visualStatusFromMicro("unread") renders the same green completion state, a stale unread mirror remains green indefinitely despite the activation; include the native unread completion state in the statuses suppressed by an acknowledged revision while continuing to preserve actual errors and input requests.
Useful? React with 👍 / 👎.
| const sessionOwners = sessionOwnerIndex(inputs); | ||
| const merged = [...mirrors.entries()].map(([identity, candidates]) => mergeMirrors(candidates, sessionOwners.get(identity))); | ||
| const activeThreads = new Set([ | ||
| ...inputs | ||
| .map((input) => input.snapshot.activeThreadKey) | ||
| .filter((threadKey): threadKey is string => threadKey != null) | ||
| .map(threadIdentity), | ||
| ...routed.filter((slot) => slot.selected && slot.threadKey).map((slot) => threadIdentity(slot.threadKey!)) | ||
| ]); |
There was a problem hiding this comment.
Track active threads while only one host is connected
The controller calls merge with one input whenever the relay is disconnected, but the single-host return occurs before this new active-thread state is updated. If the user changes or continuously views a task while the remote host is offline, reconnecting compares against stale pre-disconnect state and can either acknowledge a completion that occurred while the task stayed open or miss a genuine later activation. Update activeThreads on every merge, even when native slot ordering is returned.
Useful? React with 👍 / 👎.
| if (activeAt > completedAt) return { status: "working" }; | ||
| if (completedAt >= 0) return { status: "complete", completionRevision: info.size - length + completedAt }; |
There was a problem hiding this comment.
Compute completion revisions in bytes
completedAt is a UTF-16 string index, but it is added to a byte offset and documented/compared as a byte revision. For rollout files larger than the 512 KiB tail containing non-ASCII task text, harmless appends slide the byte window by a different amount than the decoded string index moves, changing this value for the same task_complete event and resurrecting an acknowledged completion. Locate the marker in the buffer or convert the string prefix back to its UTF-8 byte length before forming the revision.
Useful? React with 👍 / 👎.
What changed
Why
Completed tasks could first appear idle, update to finished much later, and remain stuck until their Stream Deck key was pressed. The owning rollout and the renderer where the mirrored task was open could disagree because native Micro selection only covers six slots.
Validation
0755permissions