refactor(daemon): clarify attachment session accessors
- commit
- 129ef590b39b0e5a534b045dbdd15fc82b1fc6b5
- author
- brice · · 2026-08-09 16:45 UTC
- parent
- 032899b
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +6 -6
M internal/usecase/daemon/client.go +6 -6
| @@ -210,18 +210,18 @@ func (ac *attachedClient) clearGeometryClaim() { | |||
| 210 | 210 | ac.sizeMu.Unlock() | |
| 211 | 211 | } | |
| 212 | 212 | ||
| 213 | - | func (ac *attachedClient) currentAttachmentSession() *session { | |
| 213 | + | // currentSession returns the attachment's owning local session. | |
| 214 | + | func (ac *attachedClient) currentSession() *session { | |
| 214 | 215 | if ac == nil { | |
| 215 | 216 | return nil | |
| 216 | 217 | } | |
| 217 | 218 | return ac.sess.Get() | |
| 218 | 219 | } | |
| 219 | 220 | ||
| 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. | |
| 223 | - | func (ac *attachedClient) currentSession() *session { | |
| 224 | - | return ac.currentAttachmentSession() | |
| 221 | + | // currentAttachmentSession is the explicit ownership-boundary alias used by | |
| 222 | + | // transition and rendering paths. | |
| 223 | + | func (ac *attachedClient) currentAttachmentSession() *session { | |
| 224 | + | return ac.currentSession() | |
| 225 | 225 | } | |
| 226 | 226 | ||
| 227 | 227 | func (ac *attachedClient) setSession(sess *session) { ac.sess.Set(sess) } | |
| @@ -210,18 +210,18 @@ func (ac *attachedClient) clearGeometryClaim() { | |||||
| 210 | ac.sizeMu.Unlock() | 210 | ac.sizeMu.Unlock() | ||
| 211 | } | 211 | } | ||
| 212 | 212 | ||||
| 213 | - | func (ac *attachedClient) currentAttachmentSession() *session { | 213 | + | // currentSession returns the attachment's owning local session. |
| 214 | + | func (ac *attachedClient) currentSession() *session { | |||
| 214 | if ac == nil { | 215 | if ac == nil { | ||
| 215 | return nil | 216 | return nil | ||
| 216 | } | 217 | } | ||
| 217 | return ac.sess.Get() | 218 | return ac.sess.Get() | ||
| 218 | } | 219 | } | ||
| 219 | 220 | ||||
| 220 | - | // currentSession is the legacy local-session shorthand used by input and | 221 | + | // currentAttachmentSession is the explicit ownership-boundary alias used by |
| 221 | - | // overlay paths; attachment-boundary code uses currentAttachmentSession to | 222 | + | // transition and rendering paths. |
| 222 | - | // make ownership checks explicit. | 223 | + | func (ac *attachedClient) currentAttachmentSession() *session { |
| 223 | - | func (ac *attachedClient) currentSession() *session { | 224 | + | return ac.currentSession() |
| 224 | - | return ac.currentAttachmentSession() | |||
| 225 | } | 225 | } | ||
| 226 | 226 | ||||
| 227 | func (ac *attachedClient) setSession(sess *session) { ac.sess.Set(sess) } | 227 | func (ac *attachedClient) setSession(sess *session) { ac.sess.Set(sess) } | ||