Repository navigation
Agent pane: no system call on the key path to judge who posted an event (P-MAIN S5) #28065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
58e6848
refactor(agent-pane): read an event's posting process through an inje…
lawrencecchen b89a7aa
test(agent-pane): the person-input checks make no system call per eve…
lawrencecchen 6a36a3f
fix(agent-pane): no system call on the key path to judge an event's p…
lawrencecchen d9c4ed9
test(agent-pane): a posted mouse move fills the table; no verdict kep…
lawrencecchen f6b2533
fix(agent-pane): prime the posting-process table from any event; keep…
lawrencecchen 3f13e1d
chore(arch-ratchet): owner and expiry for the EventSourceProcesses bl…
lawrencecchen 38ce555
test(agent-pane): the exit watch fires on exec; bound the kernel wait…
lawrencecchen ab90e14
fix(agent-pane): the posting-process watch also fires on exec; fail c…
lawrencecchen ff83b4e
chore(agent-pane): drop an unneeded nonisolated(unsafe) on the exit w…
lawrencecchen 97fd679
Merge remote-tracking branch 'origin/feat-cmux-next' into fix/stall-p…
lawrencecchen 092990c
Merge remote-tracking branch 'origin/feat-cmux-next' into HEAD
lawrencecchen c393763
Merge remote-tracking branch 'origin/feat-cmux-next' into fix/stall-p…
lawrencecchen 4cc0a03
refactor(agent-pane): the posting-process table lives in the person-i…
lawrencecchen 7427601
Merge remote-tracking branch 'origin/feat-cmux-next' into refresh2-28065
lawrencecchen 072f126
Merge remote-tracking branch 'origin/feat-cmux-next' into dirty/28065
lawrencecchen f1eed23
test(agent-pane): the real event-source read names other users' proce…
lawrencecchen 62fc9e9
fix(agent-pane): read an event source's start time with sysctl(KERN_P…
lawrencecchen 8a24c2b
Merge remote-tracking branch 'origin/feat-cmux-next' into pidpath-merge
lawrencecchen dc20356
fix(agent-pane): the file chooser's gesture record passes the event-s…
lawrencecchen 4b705a7
Merge commit 'fd9dbf936f3b7f239439ec701d0a5c40a8f3edb6' into pidpath-…
lawrencecchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
Packages/macOS/CmuxNext/Sources/CmuxNextAgentPane/AgentPaneShared.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| public import CmuxNextDesign | ||
|
|
||
| /// The app-wide objects every agent pane view shares, built once in the composition root and handed to each | ||
| /// ``AgentPaneView`` the agent tabs make, so the app holds one value for them, not one field per object. | ||
| /// | ||
| /// - `openPanel`: the app's made-ahead open panel (`AppServices.openPanel`) for Add Files, Attach and a page's | ||
| /// file input; nil (tests) shows no file picker. | ||
| /// - `eventSources`: the app's table of processes that post input (`AppServices.personInput.sources`): a pane | ||
| /// judges whether a key or click is the person's from it, never by a system call per event. | ||
| public struct AgentPaneShared { | ||
| public let openPanel: MadeAheadOpenPanel? | ||
| public let eventSources: EventSourceProcesses | ||
|
|
||
| /// The defaults (tests): no open panel, and a posting-process table of the pane's own. | ||
| public init(openPanel: MadeAheadOpenPanel? = nil, eventSources: EventSourceProcesses = EventSourceProcesses()) { | ||
| self.openPanel = openPanel | ||
| self.eventSources = eventSources | ||
| } | ||
| } | ||
|
|
||
| extension AgentPaneView { | ||
| /// A pane over the app's shared objects (``AgentPaneShared``); the other parameters are as in the designated init. | ||
| public convenience init?(model: AgentPaneModel, source: AgentPaneSource? = nil, renderRate: AgentPaneRenderRate = .capped, | ||
| pageHost: Bool = false, shared: AgentPaneShared) { | ||
| self.init(model: model, source: source, renderRate: renderRate, pageHost: pageHost, openPanel: shared.openPanel, | ||
| eventSources: shared.eventSources) | ||
| } | ||
| } | ||
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: The shared initializer drops
testRoot,chromium, andterminationsfromAgentPaneView's designated initializer. Callers using shared pane objects therefore silently get the default page-host and termination behavior and cannot inject test dependencies; add and forward these parameters.Prompt for AI agents