Documentation
¶
Overview ¶
Package event defines what happens in the app that another part of it reacts to: one Go type per event, the name each is known by, and the Sink that receives them.
Services emit events into the Sink they are given; the desktop shell is the one Sink of the running app. A WindowEvent is passed on to the frontend under its Name, with the event itself as the data, and the desktop bootstrap registers each one's type under that name, so the generated bindings type the frontend's listeners. The other events stay in Go: the shell acts on them itself.
Index ¶
- Constants
- type AutopilotChanged
- type AutopilotRun
- type AutopilotTarget
- type AutopilotUpdated
- type BudgetUpdated
- type DescribeItProposals
- type DescribeItUpdated
- type Discard
- type Event
- type FirstPaint
- type GHThreadsBulk
- type GHThreadsUpdated
- type HooksUpdated
- type InboxItemsChanged
- type InboxPhase
- type InboxProgress
- type InboxUpdated
- type IntegrationsChanged
- type IntervalsChanged
- type IssueProgress
- type ManifestsPhase
- type ManifestsProgress
- type MenuBarChanged
- type NotificationsUpdated
- type QuitConfirmed
- type QuitKept
- type QuitRequested
- type Relay
- type ReleasesPhase
- type ReleasesProgress
- type ReleasesUpdated
- type RepoRulesChanged
- type ResetRequested
- type RevealItem
- type ReviewProgress
- type ScriptRunProgress
- type ScriptRunsUpdated
- type ServiceStatusUpdated
- type SessionsUpdated
- type SetupFinished
- type Sink
- type StatusRulesChanged
- type TextSizeChanged
- type ThemeChanged
- type ThreadRulesChanged
- type ToolsUpdated
- type UpdateQuitHeld
- type UpdateRestartFailed
- type UpdateRestartRequested
- type UpdatesChanged
- type UpdatesUpdated
- type WindowEvent
- type WorktreesPhase
- type WorktreesProgress
- type WorktreesUpdated
Constants ¶
const ( // NameInboxUpdated is InboxUpdated's name. NameInboxUpdated = "inbox:updated" // NameRevealItem is RevealItem's name. NameRevealItem = "inbox:reveal" // NameInboxProgress is InboxProgress's name. NameInboxProgress = "inbox:progress" // NameWorktreesUpdated is WorktreesUpdated's name. NameWorktreesUpdated = "worktrees:updated" // NameNotificationsUpdated is NotificationsUpdated's name. NameNotificationsUpdated = "notifications:updated" // NameBudgetUpdated is BudgetUpdated's name. NameBudgetUpdated = "budget:updated" // NameSessionsUpdated is SessionsUpdated's name. NameSessionsUpdated = "sessions:updated" // NameReviewProgress is ReviewProgress's name. NameReviewProgress = "review:progress" // NameIssueProgress is IssueProgress's name. NameIssueProgress = "issue:progress" // NameThemeChanged is ThemeChanged's name. NameThemeChanged = "settings:theme" // NameTextSizeChanged is TextSizeChanged's name. NameTextSizeChanged = "settings:textSize" // NameMenuBarChanged is MenuBarChanged's name. NameMenuBarChanged = "settings:menuBar" // NameFirstPaint is FirstPaint's name. NameFirstPaint = "app:firstPaint" // NameToolsUpdated is ToolsUpdated's name. NameToolsUpdated = "tools:updated" // NameIntegrationsChanged is IntegrationsChanged's name. NameIntegrationsChanged = "integrations:changed" // NameScriptRunsUpdated is ScriptRunsUpdated's name. NameScriptRunsUpdated = "scriptruns:updated" // NameScriptRunProgress is ScriptRunProgress's name. NameScriptRunProgress = "scriptruns:progress" // NameQuitRequested is QuitRequested's name. NameQuitRequested = "app:quitRequested" // NameQuitConfirmed is QuitConfirmed's name. NameQuitConfirmed = "app:quitConfirmed" // NameQuitKept is QuitKept's name. NameQuitKept = "app:quitKept" // NameReleasesUpdated is ReleasesUpdated's name. NameReleasesUpdated = "releases:updated" // NameReleasesProgress is ReleasesProgress's name. NameReleasesProgress = "releases:progress" // NameHooksUpdated is HooksUpdated's name. NameHooksUpdated = "hooks:updated" // NameWorktreesProgress is WorktreesProgress's name. NameWorktreesProgress = "worktrees:progress" // NameManifestsProgress is ManifestsProgress's name. NameManifestsProgress = "manifests:progress" // NameIntervalsChanged is IntervalsChanged's name. NameIntervalsChanged = "settings:intervalsChanged" // NameRepoRulesChanged is RepoRulesChanged's name. NameRepoRulesChanged = "settings:repoRulesChanged" // NameThreadRulesChanged is ThreadRulesChanged's name. NameThreadRulesChanged = "settings:threadRulesChanged" // NameStatusRulesChanged is StatusRulesChanged's name. NameStatusRulesChanged = "settings:statusRulesChanged" // NameGHThreadsUpdated is GHThreadsUpdated's name. NameGHThreadsUpdated = "ghthreads:updated" // NameGHThreadsBulk is GHThreadsBulk's name. NameGHThreadsBulk = "ghthreads:bulk" // NameServiceStatusUpdated is ServiceStatusUpdated's name. NameServiceStatusUpdated = "servicestatus:updated" // NameSetupFinished is SetupFinished's name. NameSetupFinished = "setup:finished" // NameResetRequested is ResetRequested's name. NameResetRequested = "app:resetRequested" // NameUpdatesChanged is UpdatesChanged's name. NameUpdatesChanged = "settings:updatesChanged" // NameAutopilotChanged is AutopilotChanged's name. NameAutopilotChanged = "settings:autopilotChanged" // NameInboxItemsChanged is InboxItemsChanged's name. NameInboxItemsChanged = "inbox:itemsChanged" // NameAutopilotUpdated is AutopilotUpdated's name. NameAutopilotUpdated = "autopilot:updated" // NameAutopilotRun is AutopilotRun's name. NameAutopilotRun = "autopilot:run" // NameDescribeItUpdated is DescribeItUpdated's name. NameDescribeItUpdated = "describeit:updated" // NameDescribeItProposals is DescribeItProposals's name. NameDescribeItProposals = "describeit:proposals" // NameUpdatesUpdated is UpdatesUpdated's name. NameUpdatesUpdated = "updates:updated" // NameUpdateRestartRequested is UpdateRestartRequested's name. NameUpdateRestartRequested = "updates:restart" // NameUpdateRestartFailed is UpdateRestartFailed's name. NameUpdateRestartFailed = "updates:restartFailed" // NameUpdateQuitHeld is UpdateQuitHeld's name. NameUpdateQuitHeld = "updates:quitHeld" )
The events' names. A window event's name is part of the frontend's contract: the generated bindings key its type by it, and the frontend listens for it.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutopilotChanged ¶ added in v0.4.0
type AutopilotChanged struct{}
AutopilotChanged says the user changed one of Autopilot's settings (Pause Autopilot, the mode new routines start in, a limit, the daily cap, or how long the history is kept), and it was stored. It stays in Go, for what follows the settings to read them again; the window has the settings from the setter.
func (AutopilotChanged) Name ¶ added in v0.4.0
func (AutopilotChanged) Name() string
Name returns NameAutopilotChanged.
type AutopilotRun ¶ added in v0.4.0
type AutopilotRun struct {
// RunID is the ledger's run.
RunID int64 `json:"runId"`
}
AutopilotRun says an agent's background run has new events, as its stream grows: the window asks for its events after the last it has (autopilot.Service.RunEvents), so the event never carries a log. It comes at most four times a second for a run.
func (AutopilotRun) Name ¶ added in v0.4.0
func (AutopilotRun) Name() string
Name returns NameAutopilotRun.
type AutopilotTarget ¶ added in v0.4.0
type AutopilotTarget struct {
RoutineID int64 `json:"routineId"`
MatchID int64 `json:"matchId"`
RunID int64 `json:"runId"`
CreatedAt string `json:"createdAt"`
Activity bool `json:"activity"`
}
AutopilotTarget is what an Autopilot notification opens in the Autopilot tab: its routine, and the match (its card in Activity) or the agent run (the run view) when it names one. CreatedAt is when the most specific of them was created, as RFC 3339 (the run's, else the match's, else the routine's), which tells it from a later one given its ID, since Clear history hands IDs out again. Activity asks for the tab's Activity, at the matches waiting for the user, as the menu bar's row of them does; no notification names it. The zero target names nothing.
func (AutopilotTarget) IsZero ¶ added in v0.4.0
func (t AutopilotTarget) IsZero() bool
IsZero reports a target that names nothing.
type AutopilotUpdated ¶ added in v0.4.0
type AutopilotUpdated struct{}
AutopilotUpdated says Autopilot changed: its routines, what they matched and ran, or its engine (a cycle ended, or this copy took or lost the engine). It comes at most four times a second; the window reads what it shows again.
func (AutopilotUpdated) Name ¶ added in v0.4.0
func (AutopilotUpdated) Name() string
Name returns NameAutopilotUpdated.
type BudgetUpdated ¶
type BudgetUpdated struct{}
BudgetUpdated says a GitHub API budget changed, as a response reported it, or what the app spent from one: the window reads the budgets again.
type DescribeItProposals ¶ added in v0.7.0
type DescribeItProposals struct{}
DescribeItProposals says the cards from the user's own Claude Code changed: one came, or one was dealt with. The window reads them again, and the left nav's count.
func (DescribeItProposals) Name ¶ added in v0.7.0
func (DescribeItProposals) Name() string
Name returns NameDescribeItProposals.
type DescribeItUpdated ¶ added in v0.7.0
type DescribeItUpdated struct {
// ConversationID is the conversation, and Turn the turn that changed, 0 for the
// conversation as a whole.
ConversationID string `json:"conversationId"`
Turn int `json:"turn"`
}
DescribeItUpdated says Describe it's current conversation changed: a turn started, its agent said or did more, it ended, or one of its cards was dealt with. The window reads the conversation again, and the turn's events after the last it has, so the event never carries a stream. It comes at most four times a second.
func (DescribeItUpdated) Name ¶ added in v0.7.0
func (DescribeItUpdated) Name() string
Name returns NameDescribeItUpdated.
type Event ¶
type Event interface {
// Name is the name the event is known by.
Name() string
}
Event is something that happened, or was asked for, that another part of the app reacts to.
type FirstPaint ¶
type FirstPaint struct {
// Measurement is the time from process start to the first paint.
Measurement timing.Measurement
}
FirstPaint says the window painted its first frame. It comes once per run, and ends a startup measurement.
type GHThreadsBulk ¶
type GHThreadsBulk struct {
Done int `json:"done"`
Failed int `json:"failed"`
Left int `json:"left"`
More bool `json:"more"`
}
GHThreadsBulk says how far the bulk mark of the user's GitHub notifications (Mark all done) has got, after each notification it marked done or gave up on: how many it marked, how many it couldn't, and how many in its scope the mirror still lists, with More when GitHub holds more than the mirror. It comes once a notification, every second and a half at most. A pause, the end, or a stop comes as GHThreadsUpdated, and the window reads everything again; the mirror's rows the marks took out come that way too, every few seconds.
type GHThreadsUpdated ¶
type GHThreadsUpdated struct{}
GHThreadsUpdated says what the window shows of the user's GitHub notifications changed: a pass read them, or checked their items' states, and found something new; reading them was turned off; or whether GitHub lets the token read them, or the last pass's error, changed. The window reads them again. A pass that changed nothing tells nothing.
func (GHThreadsUpdated) Name ¶
func (GHThreadsUpdated) Name() string
Name returns NameGHThreadsUpdated.
type HooksUpdated ¶
type HooksUpdated struct{}
HooksUpdated says the Hooks page's list changed: a clone was scanned again, or a hooks action or a checks run ended. The window reads the list again, which serves what is kept and scans again only the clones that changed.
type InboxItemsChanged ¶ added in v0.4.0
type InboxItemsChanged struct {
// IDs are the items stored, each once, in order.
IDs []int64
}
InboxItemsChanged says the inbox stored items outside a whole refresh: what the routines' searches watch, a round of the checks follower, or an item's own read or an action on it. It stays in Go, for what acts on the items to read them again; the window hears the inbox's own changes as InboxUpdated.
func (InboxItemsChanged) Name ¶ added in v0.4.0
func (InboxItemsChanged) Name() string
Name returns NameInboxItemsChanged.
type InboxPhase ¶ added in v0.4.0
type InboxPhase string
InboxPhase is how far a refresh of the inbox has got.
const ( // InboxSearching is GitHub being asked for the inbox's searches, and for the details // of the items already listed beside them. It counts nothing. InboxSearching InboxPhase = "search" // InboxReadingDetails is the details of the items new since the last refresh being // read, counted. InboxReadingDetails InboxPhase = "details" // InboxCheckingFiles is the changed files of the pull requests whose files are checked // being read, counted. InboxCheckingFiles InboxPhase = "files" )
The phases of a refresh of the inbox, in order.
type InboxProgress ¶ added in v0.4.0
type InboxProgress struct {
Phase InboxPhase `json:"phase"`
Done int `json:"done"`
Total int `json:"total"`
}
InboxProgress says how far a whole refresh of the inbox has got, while it runs: its phase, and how many of the phase's items are done. It comes a few times a second at most, whoever started the refresh; the InboxUpdated that ends it follows, with the snapshot no longer refreshing. It is never told as an InboxUpdated, so what wakes on that, as Autopilot's engine does, doesn't wake when a refresh starts.
func (InboxProgress) Name ¶ added in v0.4.0
func (InboxProgress) Name() string
Name returns NameInboxProgress.
type InboxUpdated ¶
type InboxUpdated struct{}
InboxUpdated says the stored inbox, or the status of its last refresh, changed: the window reads the inbox again, and the menu bar redraws.
type IntegrationsChanged ¶
type IntegrationsChanged struct {
// CopyChosen reports a chosen copy of a tool, rather than a switch.
CopyChosen bool
}
IntegrationsChanged says the user flipped an integration's switch or chose a copy of a tool, and it was stored. Core has the integrations look for the tools again when a copy was chosen, and otherwise tells the window that what they list changed.
func (IntegrationsChanged) Name ¶
func (IntegrationsChanged) Name() string
Name returns NameIntegrationsChanged.
type IntervalsChanged ¶
type IntervalsChanged struct{}
IntervalsChanged says the user changed how often the app reads something again on its own (the inbox, the running checks, the Release page's running checks, the worktrees, the GitHub notifications, the status pages), or turned the watch for pushes on or off, and it was stored. It stays in Go: core wakes what reads them again, which works its next wait out from the new interval, and the push watch, which reads its switch again.
func (IntervalsChanged) Name ¶
func (IntervalsChanged) Name() string
Name returns NameIntervalsChanged.
type IssueProgress ¶
type IssueProgress struct {
// ItemID is the stored issue the action is on.
ItemID int64 `json:"itemId"`
// Step says what the action is doing now.
Step string `json:"step"`
}
IssueProgress says what the issue sheet's action on an issue is doing now, as in "Checking for new comments since you opened it" or "Closing as completed", so the sheet can show each step while the user waits for GitHub.
type ManifestsPhase ¶
type ManifestsPhase string
ManifestsPhase is how far a read of the Deps page's clones has got.
const ( // ManifestsFindingClones is the repository locations being searched for clones. It // counts nothing. ManifestsFindingClones ManifestsPhase = "clones" // ManifestsReadingClones is each clone's go.mod and package.json files being read, at // the commit its row shows, counted. ManifestsReadingClones ManifestsPhase = "reading" )
The phases of a read of the Deps page's clones, in order.
type ManifestsProgress ¶
type ManifestsProgress struct {
Phase ManifestsPhase `json:"phase"`
Done int `json:"done"`
Total int `json:"total"`
}
ManifestsProgress says how far a read of the Deps page's clones has got, while it runs: its phase, and how many of the phase's clones are done. Finding the clones counts nothing. It comes a few times a second at most, and the page's own answer follows it.
func (ManifestsProgress) Name ¶
func (ManifestsProgress) Name() string
Name returns NameManifestsProgress.
type MenuBarChanged ¶
type MenuBarChanged struct {
// On is whether the icon shows.
On bool
}
MenuBarChanged says the user turned the menu bar icon on or off and it was stored.
type NotificationsUpdated ¶
type NotificationsUpdated struct{}
NotificationsUpdated says the notification log changed: the window reads it again.
func (NotificationsUpdated) Name ¶
func (NotificationsUpdated) Name() string
Name returns NameNotificationsUpdated.
type QuitConfirmed ¶
type QuitConfirmed struct {
// Restarting marks the restart to update's confirmation, which quits nothing itself.
Restarting bool
}
QuitConfirmed says the user chose to stop the runs and quit. The desktop shell hears it, lets the next quit through, and quits; shutdown stops the runs.
A restart to update sends it with Restarting set, just before the update's installer quits the app itself: the shell then lets every quit through, whatever runs go, but quits nothing, since a quit of its own could come before the installer's helper stands by. A held quit would leave that helper to open this copy again beside the new one.
type QuitKept ¶ added in v0.3.1
type QuitKept struct{}
QuitKept says the user chose to keep the app running when its quit asked first (Keep running). It stays in Go: the desktop shell forgets the copy a move to Applications asked to open once the app quits, so a later quit opens nothing.
type QuitRequested ¶
type QuitRequested struct{}
QuitRequested says the user asked to quit while runs are going in the app: the window asks whether to stop them and quit, or keep running.
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
Relay is a Sink that passes each event on to the Sink it is connected to, and drops events until it is. It lets the services that emit be built before the Sink that hears them, as the desktop shell is, which needs those services. It is safe for concurrent use; the zero value is ready.
type ReleasesPhase ¶
type ReleasesPhase string
ReleasesPhase is how far a read of the Release page's list has got.
const ( // ReleasesFindingClones is the clone root being searched for clones. ReleasesFindingClones ReleasesPhase = "clones" // ReleasesAskingGitHub is GitHub being asked about each clone's repository. ReleasesAskingGitHub ReleasesPhase = "github" // ReleasesComparing is GitHub being asked how far each default branch is ahead of its // newest version. ReleasesComparing ReleasesPhase = "compare" // ReleasesCheckingClones is the unreleased clones being read. ReleasesCheckingClones ReleasesPhase = "checking" )
The phases of a read of the Release page's list, in order.
type ReleasesProgress ¶
type ReleasesProgress struct {
Phase ReleasesPhase `json:"phase"`
Done int `json:"done"`
Total int `json:"total"`
}
ReleasesProgress says how far a read of the Release page's list has got, while it runs: its phase, and how many of the phase's repositories or clones are done. Finding the clones counts nothing, and the read of a released repository alone finds none. It comes a few times a second at most, and ReleasesUpdated follows once the read lands.
func (ReleasesProgress) Name ¶
func (ReleasesProgress) Name() string
Name returns NameReleasesProgress.
type ReleasesUpdated ¶
type ReleasesUpdated struct{}
ReleasesUpdated says the Release page's list changed: it was read again from GitHub, in full or, after a release ended, for the repository released alone; a release ended, and its repository is being read again, so the list reads as refreshing until that lands; or the list went out of date. The window reads it, and a list out of date is read again from GitHub then.
func (ReleasesUpdated) Name ¶
func (ReleasesUpdated) Name() string
Name returns NameReleasesUpdated.
type RepoRulesChanged ¶
type RepoRulesChanged struct{}
RepoRulesChanged says the user pinned or muted a repository or an org, or took the rule off, and it was stored. It stays in Go: core tells the window the inbox changed, which the menu bar shows too, and has the Release page regroup its list.
func (RepoRulesChanged) Name ¶
func (RepoRulesChanged) Name() string
Name returns NameRepoRulesChanged.
type ResetRequested ¶ added in v0.3.0
type ResetRequested struct{}
ResetRequested says the user asked to start over, and the request is written: the desktop shell lets the quit through, quits, and opens the app again, whose start carries the reset out.
func (ResetRequested) Name ¶ added in v0.3.0
func (ResetRequested) Name() string
Name returns NameResetRequested.
type RevealItem ¶
type RevealItem struct {
// ItemID is the stored item to show, or 0 for none.
ItemID int64 `json:"itemId"`
// URL is the item on GitHub, which the window opens when the item is no longer in
// the inbox, or the page of a notification about no item.
URL string `json:"url"`
// RunID is the run to open, which a failed run's notification names, or 0 for none, and
// RunStarted when it started, as RFC 3339: the window opens the run only while the run
// with that ID started then.
RunID int64 `json:"runId"`
RunStarted string `json:"runStarted"`
// NotificationID is the notification a clicked banner stands for, which the window
// marks read, or 0 for none: a summary's, a session's, the menu bar's, or a session's
// focus. The window marks it only while the log's entry with that ID is about this
// item, URL, run, or Autopilot target, since the log hands an ID out again once it is
// cleared.
NotificationID int64 `json:"notificationId"`
// Autopilot is what an Autopilot notification opens in the Autopilot tab, or the zero
// target for none.
Autopilot AutopilotTarget `json:"autopilot"`
}
RevealItem asks for the window to come forward with an item in view, for a click on the item in the menu bar or on its notification, or with the run a notification is about open in Scripts → Runs, or with what an Autopilot notification is about. A click on a banner also names the notification it stands for, which the window marks read. A request that names no item, URL, run, Autopilot target, or notification, such as a click on a banner that stands for many items, only brings the window forward; the frontend is not told.
func (RevealItem) Named ¶ added in v0.4.0
func (r RevealItem) Named() bool
Named reports whether the request names anything for the window to show or mark: an item, a URL, a run, a notification, or an Autopilot target.
type ReviewProgress ¶
type ReviewProgress struct {
// ItemID is the stored pull request the action is on.
ItemID int64 `json:"itemId"`
// Step says what the action is doing now.
Step string `json:"step"`
}
ReviewProgress says what the review sheet's action on a pull request is doing now, as in "Approving" or "Checking that GitHub can merge it", so the sheet can show each step while the user waits for GitHub.
type ScriptRunProgress ¶
type ScriptRunProgress struct {
// ID is the run's ID.
ID int64 `json:"id"`
}
ScriptRunProgress says one run going now changed its progress (scriptrun.Progress): it reached a step, or Stop turned on or off. The window reads that run again, and only that one; the history is as it was. It never carries output.
func (ScriptRunProgress) Name ¶
func (ScriptRunProgress) Name() string
Name returns NameScriptRunProgress.
type ScriptRunsUpdated ¶
type ScriptRunsUpdated struct{}
ScriptRunsUpdated says a run started, ended, or changed status, or the history changed: the window lists the runs again and pulls what it shows. It never carries output.
func (ScriptRunsUpdated) Name ¶
func (ScriptRunsUpdated) Name() string
Name returns NameScriptRunsUpdated.
type ServiceStatusUpdated ¶
type ServiceStatusUpdated struct{}
ServiceStatusUpdated says a pass of the service status check ended, whether its checks worked or not, or what the user watches changed: the window reads the status again.
func (ServiceStatusUpdated) Name ¶
func (ServiceStatusUpdated) Name() string
Name returns NameServiceStatusUpdated.
type SessionsUpdated ¶
type SessionsUpdated struct{}
SessionsUpdated says an agent session was launched, or changed what it is doing: the window reads the sessions again, and the menu bar redraws.
func (SessionsUpdated) Name ¶
func (SessionsUpdated) Name() string
Name returns NameSessionsUpdated.
type SetupFinished ¶ added in v0.3.0
type SetupFinished struct{}
SetupFinished says the user finished the first-run setup, or skipped it. The desktop shell hears it and asks once to allow notification banners, which it held while the setup showed, so the question comes when the user lands in the inbox, not before they know what the app does.
func (SetupFinished) Name ¶ added in v0.3.0
func (SetupFinished) Name() string
Name returns NameSetupFinished.
type Sink ¶
type Sink interface {
Emit(e Event)
}
Sink receives events. Emit must return promptly and must not call back into the service that emitted: services emit while they hold their own locks.
type StatusRulesChanged ¶
type StatusRulesChanged struct{}
StatusRulesChanged says the user turned a status page on or off, or ticked or unticked a part of one to watch, and it was stored. It stays in Go: core has the service status check follow it, forgetting a provider turned off and checking one turned on at once; the window has the settings from the setter already, and hears the status changed.
func (StatusRulesChanged) Name ¶
func (StatusRulesChanged) Name() string
Name returns NameStatusRulesChanged.
type TextSizeChanged ¶
type TextSizeChanged struct {
// Size is the stored text size: one of the settings package's text size choices.
Size string
}
TextSizeChanged says the user chose a text size and it was stored. The shell sets the window's smallest size to suit it; the page shows the size itself.
func (TextSizeChanged) Name ¶
func (TextSizeChanged) Name() string
Name returns NameTextSizeChanged.
type ThemeChanged ¶
type ThemeChanged struct {
// Theme is the stored theme: one of the settings package's theme choices.
Theme string
}
ThemeChanged says the user chose a theme and it was stored. The shell brings the window's native appearance along with it; the page has already switched itself.
type ThreadRulesChanged ¶
type ThreadRulesChanged struct{}
ThreadRulesChanged says the user changed a rule for their GitHub notifications (whether they are read, whether, how, and when they are cleared), and it was stored. It stays in Go: core has the mirror of the notifications decide every thread again at once, so clearing turned off stops at once, and turned on clears what is finished.
func (ThreadRulesChanged) Name ¶
func (ThreadRulesChanged) Name() string
Name returns NameThreadRulesChanged.
type ToolsUpdated ¶
type ToolsUpdated struct{}
ToolsUpdated says what the integrations service lists changed: a detection or an update check finished, or a run started or ended, which can block or free a tool's update. The window reads the list again.
type UpdateQuitHeld ¶ added in v0.3.1
type UpdateQuitHeld struct {
// HelperStarted is when the restart began starting the helper, just before the
// runtime's restart was called: the helper's wait for the app to exit starts soon
// after, so the shell times its exit from here, never from when this arrived, which a
// quit slow to return delays.
HelperStarted time.Time
}
UpdateQuitHeld says a restart to update staged the update and started the runtime's helper, but the quit that should have ended the app was held (a modal panel, say), so the app runs on while the helper waits for it to exit. It stays in Go: the shell asks to quit again a few times and, failing that, shuts down in order and exits, so the helper installs the update instead of giving up and opening this copy again beside it.
func (UpdateQuitHeld) Name ¶ added in v0.3.1
func (UpdateQuitHeld) Name() string
Name returns NameUpdateQuitHeld.
type UpdateRestartFailed ¶ added in v0.3.1
type UpdateRestartFailed struct{}
UpdateRestartFailed says a restart to update failed after its QuitConfirmed let the quit through, and the app runs on. It stays in Go: the shell holds a quit while runs go again.
func (UpdateRestartFailed) Name ¶ added in v0.3.1
func (UpdateRestartFailed) Name() string
Name returns NameUpdateRestartFailed.
type UpdateRestartRequested ¶ added in v0.3.1
type UpdateRestartRequested struct{}
UpdateRestartRequested asks the window to restart to update, as the menu bar's Restart to Update does: every restart starts in the window, which asks first when restarting would lose something.
func (UpdateRestartRequested) Name ¶ added in v0.3.1
func (UpdateRestartRequested) Name() string
Name returns NameUpdateRestartRequested.
type UpdatesChanged ¶ added in v0.3.1
type UpdatesChanged struct{}
UpdatesChanged says the user chose what the app does when a new version is out, and it was stored. It stays in Go: core wakes the update check, which follows the new choice at once (a version found while the app only told is downloaded once the user asks for downloads); the window has the settings from the setter, and hears the update's status changed.
func (UpdatesChanged) Name ¶ added in v0.3.1
func (UpdatesChanged) Name() string
Name returns NameUpdatesChanged.
type UpdatesUpdated ¶ added in v0.3.1
type UpdatesUpdated struct{}
UpdatesUpdated says the app's update changed: a check started or ended, a download got further (a few times a second at most), a version is ready, a restart began or failed, or Later was chosen or lifted. The window reads the update's status again, and the menu bar redraws.
func (UpdatesUpdated) Name ¶ added in v0.3.1
func (UpdatesUpdated) Name() string
Name returns NameUpdatesUpdated.
type WindowEvent ¶
type WindowEvent interface {
Event
// contains filtered or unexported methods
}
WindowEvent is an event the frontend hears too. Only this package's types are window events, so the set the desktop bootstrap registers is the set WindowEvents returns.
func WindowEvents ¶
func WindowEvents() []WindowEvent
WindowEvents returns one of each window event. The repository's checks compare it with the events the desktop bootstrap registers.
type WorktreesPhase ¶
type WorktreesPhase string
WorktreesPhase is how far a listing of the worktrees has got.
const ( // WorktreesFindingClones is the clone root being searched for clones. WorktreesFindingClones WorktreesPhase = "clones" // WorktreesListing is each clone's worktrees being listed. WorktreesListing WorktreesPhase = "listing" // WorktreesChecking is each worktree being read: its changes, its branch, and its // commits. WorktreesChecking WorktreesPhase = "checking" // WorktreesAskingGitHub is GitHub being asked about the pull requests and issues the // worktrees belong to. WorktreesAskingGitHub WorktreesPhase = "github" )
The phases of a listing of the worktrees, in order.
type WorktreesProgress ¶
type WorktreesProgress struct {
Phase WorktreesPhase `json:"phase"`
Done int `json:"done"`
Total int `json:"total"`
}
WorktreesProgress says how far the window's listing of the worktrees has got, while it runs: its phase, and how many of the phase's clones, worktrees, or pull requests and issues are done. Finding the clones counts nothing. It comes a few times a second at most, and the listing's own answer follows it; a listing another job runs, such as the sweep, tells nothing.
func (WorktreesProgress) Name ¶
func (WorktreesProgress) Name() string
Name returns NameWorktreesProgress.
type WorktreesUpdated ¶
type WorktreesUpdated struct{}
WorktreesUpdated says an automatic worktree sweep removed a worktree or changed how many need attention: the window reads the latest sweep.
func (WorktreesUpdated) Name ¶
func (WorktreesUpdated) Name() string
Name returns NameWorktreesUpdated.