Conversation
…ibutors Layout, architecture invariants, persistence, and "what not to do" sections were written before the NSTextView-backed message buffer, the inline link-preview attachment cells, and the presence-run collapse engine landed on main. Update them to reflect the code as it stands today: - Layout: mention `ChatFold`, `IRCFormatting`, and `MessageBufferView` in the two targets' file catalogs. - Architecture invariants: document the `MessageBufferView` / `NSTextView` hosting model, where per-view presentation state lives (on the Coordinator, never on `@Observable` models), the `LinkPreviewAttachmentCell` rendering path, and the presence-run fold + `brygga-toggle-run://` click intercept. - Persistence: add `channelPresenceCollapse: [String: Bool]?` to the `ServerConfig` field list with a note on its shape and inheritance. - SwiftUI gotchas: add two entries — `.textSelection(.enabled)` is per-Text and can't cross rows, and how to observe an @observable store from inside a Coordinator via `withObservationTracking`. - Pure-Swift rule: clarify the `@objc` carve-out — private AppKit target-action selectors are acceptable, public Obj-C APIs are not. Flip the AI attribution policy for external contributors: require a `Co-Authored-By:` trailer naming the assistant and ask them to paste the prompt verbatim in the commit body (or PR body if it evolved across commits). Add a mandatory "## AI assistance" heading to the PR body template.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainafter Make chat content selectable and add Copy context menu #1, Back MessageList with NSTextView (re-target of #2 to main) #3, and Collapse join/part/quit/nick runs into a summary row #4 —MessageBufferView, inline link-preview cells, the presence-run fold engine, and the newchannelPresenceCollapseJSON field.Co-Authored-By:trailer and include the prompt used (verbatim, in the commit or PR body).Changes
ChatFold,IRCFormattingto the core catalog; call outMessageBufferViewexplicitly in the executable target catalog.MessageBufferView: NSViewRepresentableand where per-view state lives, theLinkPreviewAttachmentCellrendering path, the presence-run fold +brygga-toggle-run://click intercept, and a tightened@objccarve-out (private AppKit target-action selectors are OK, public Obj-C API is not).channelPresenceCollapse: [String: Bool]?alongside the otherServerConfigfields with a note on its shape and inheritance rules..textSelection(.enabled)is per-Textand cannot cross rows, and how to observe@Observablestores from inside a Coordinator viawithObservationTracking.Co-Authored-By:trailer plus a verbatim prompt in the commit body or PR body.## AI assistanceheading.@objcrule with a pointer to the carve-out.Test plan
N/A, docs only.
Risk / rollback
None — pure documentation. Revert the commit to restore the previous policy.