detached 032899b

docs(protocol): clarify route frame allocations

commit
032899ba89ac84dc0f045e3387092ba048a7f938
author
brice · · 2026-08-09 16:44 UTC
parent
5884320
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +17 -11
M internal/ports/frame.go +12 -10
@@ -41,16 +41,18 @@ const (
4141 MsgOutputResetRequest MsgType = 13
4242 MsgRemotePreviewRequest MsgType = 15
4343
44- MsgWelcome MsgType = 16
45- MsgError MsgType = 17
46- MsgOutput MsgType = 18
47- MsgDetached MsgType = 19
48- MsgPong MsgType = 20
49- MsgSessions MsgType = 21
50- MsgCommandResult MsgType = 22
51- MsgAttachTarget MsgType = 25
52- MsgRemotePreviewResponse MsgType = 26
53- MsgNavigationAction MsgType = 23
44+ MsgWelcome MsgType = 16
45+ MsgError MsgType = 17
46+ MsgOutput MsgType = 18
47+ MsgDetached MsgType = 19
48+ MsgPong MsgType = 20
49+ MsgSessions MsgType = 21
50+ MsgCommandResult MsgType = 22
51+ MsgNavigationAction MsgType = 23
52+ MsgAttachTarget MsgType = 25
53+ MsgRemotePreviewResponse MsgType = 26
54+ // Route navigation metadata/control frames occupy the post-26 server range;
55+ // 14 and 24 remain reserved for compatibility with older peers.
5456 MsgCommittedRouteIdentity MsgType = 27
5557 MsgRecentRouteSnapshot MsgType = 28
5658 MsgNavigateRecentRoute MsgType = 29
@@ -41,16 +41,18 @@ const (
41 MsgOutputResetRequest MsgType = 1341 MsgOutputResetRequest MsgType = 13
42 MsgRemotePreviewRequest MsgType = 1542 MsgRemotePreviewRequest MsgType = 15
43 43
44- MsgWelcome MsgType = 1644+ MsgWelcome MsgType = 16
45- MsgError MsgType = 1745+ MsgError MsgType = 17
46- MsgOutput MsgType = 1846+ MsgOutput MsgType = 18
47- MsgDetached MsgType = 1947+ MsgDetached MsgType = 19
48- MsgPong MsgType = 2048+ MsgPong MsgType = 20
49- MsgSessions MsgType = 2149+ MsgSessions MsgType = 21
50- MsgCommandResult MsgType = 2250+ MsgCommandResult MsgType = 22
51- MsgAttachTarget MsgType = 2551+ MsgNavigationAction MsgType = 23
52- MsgRemotePreviewResponse MsgType = 2652+ MsgAttachTarget MsgType = 25
53- MsgNavigationAction MsgType = 2353+ MsgRemotePreviewResponse MsgType = 26
54+ // Route navigation metadata/control frames occupy the post-26 server range;
55+ // 14 and 24 remain reserved for compatibility with older peers.
54 MsgCommittedRouteIdentity MsgType = 2756 MsgCommittedRouteIdentity MsgType = 27
55 MsgRecentRouteSnapshot MsgType = 2857 MsgRecentRouteSnapshot MsgType = 28
56 MsgNavigateRecentRoute MsgType = 2958 MsgNavigateRecentRoute MsgType = 29
M internal/ports/routes_wire.go +2 -0
@@ -119,6 +119,8 @@ func marshalCommittedRouteIdentityFields(w *payloadWriter, identity CommittedRou
119119 w.putBool(identity.Ephemeral)
120120 }
121121
122+// marshalCommittedIdentitySection shares the standalone identity body and
123+// validates embedded identities before Welcome serialization.
122124 func marshalCommittedIdentitySection(w *payloadWriter, identity *CommittedRouteIdentity) bool {
123125 w.putBool(identity != nil)
124126 if identity == nil {
@@ -119,6 +119,8 @@ func marshalCommittedRouteIdentityFields(w *payloadWriter, identity CommittedRou
119 w.putBool(identity.Ephemeral)119 w.putBool(identity.Ephemeral)
120 }120 }
121 121
122+// marshalCommittedIdentitySection shares the standalone identity body and
123+// validates embedded identities before Welcome serialization.
122 func marshalCommittedIdentitySection(w *payloadWriter, identity *CommittedRouteIdentity) bool {124 func marshalCommittedIdentitySection(w *payloadWriter, identity *CommittedRouteIdentity) bool {
123 w.putBool(identity != nil)125 w.putBool(identity != nil)
124 if identity == nil {126 if identity == nil {
M internal/usecase/daemon/client.go +3 -1
@@ -217,7 +217,9 @@ func (ac *attachedClient) currentAttachmentSession() *session {
217217 return ac.sess.Get()
218218 }
219219
220-// currentSession narrows the attachment to its owning local session.
220+// currentSession is the legacy local-session shorthand used by input and
221+// overlay paths; attachment-boundary code uses currentAttachmentSession to
222+// make ownership checks explicit.
221223 func (ac *attachedClient) currentSession() *session {
222224 return ac.currentAttachmentSession()
223225 }
@@ -217,7 +217,9 @@ func (ac *attachedClient) currentAttachmentSession() *session {
217 return ac.sess.Get()217 return ac.sess.Get()
218 }218 }
219 219
220-// currentSession narrows the attachment to its owning local session.220+// currentSession is the legacy local-session shorthand used by input and
221+// overlay paths; attachment-boundary code uses currentAttachmentSession to
222+// make ownership checks explicit.
221 func (ac *attachedClient) currentSession() *session {223 func (ac *attachedClient) currentSession() *session {
222 return ac.currentAttachmentSession()224 return ac.currentAttachmentSession()
223 }225 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close