Merge lane-go: keep the lane's reviewed work
Combines lane-go's typed omni search, launch-time model overrides, TUI artifacts view, run-state websocket push, and the "reflect the change where it belongs" committer rule with the Templates gallery, chat/omni-search and other reviewed work already on main. The 12 files both sides touched keep both intents composed rather than dropping either side: the omni search keeps the typed search contract (CLI `pipelines search` and the TUI popup with type badges and marked snippets) alongside the run-list quick filter; cli.md and ui-ux-review.md document both the search rework and the artifacts view; orchestration.md, harnesses.md and operations.md keep the model-override and reflect-where-it-belongs guidance; and the protocol/CLI/server/TUI code keeps the new search, run-event, override and artifacts paths alongside the existing run, title and help surfaces. Checks before committing: - go build ./... -- pass - go vet ./... -- pass - go test -count=1 ./internal/... ./cmd/... -- all pass Doc check before committing: nothing needs updating. The lane's own docs and references (docs/cli.md, docs/ui-ux-review.md, and the orchestration, harnesses and operations skill references) already carry the new features. format.md and the packaged templates already describe the line-oriented result format and the human decision stage from the earlier lane-go merge. The root README already describes the omni search popup. Model overrides, the search command, run events and the artifacts view are runtime/CLI/TUI surfaces that cli.md documents; no template, README or topic-doc edit is required by this merge.
This commit is contained in:
@@ -134,6 +134,13 @@ type Model struct {
|
||||
commandIndex int
|
||||
homeTop int
|
||||
searchOpen bool
|
||||
searchResults []protocol.SearchResult
|
||||
searchText string
|
||||
searchRequest string
|
||||
searchInFlight bool
|
||||
searchQueued bool
|
||||
searchError string
|
||||
pendingRunNav *searchNav
|
||||
detail *protocol.PipelineDetail
|
||||
detailRequest string
|
||||
detailLoading bool
|
||||
@@ -197,6 +204,9 @@ type Model struct {
|
||||
decisionIndex int
|
||||
decisionFeedback textinput.Model
|
||||
decisionFeedbackFocus bool
|
||||
artifactsOpen bool
|
||||
artifactIndex int
|
||||
artifactTop int
|
||||
editorOpen bool
|
||||
editorInput textinput.Model
|
||||
editorIndex int
|
||||
@@ -269,6 +279,17 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.appendLine("Harness debug: " + msg.err.Error())
|
||||
}
|
||||
return m, nil
|
||||
case artifactActionMsg:
|
||||
if msg.err != nil {
|
||||
m.appendLine("Artifact " + msg.verb + ": " + msg.err.Error())
|
||||
return m, nil
|
||||
}
|
||||
if msg.verb == "copy" {
|
||||
m.appendLine("Copied artifact URL: " + msg.url)
|
||||
} else {
|
||||
m.appendLine("Opened artifact URL: " + msg.url)
|
||||
}
|
||||
return m, nil
|
||||
case spinner.TickMsg:
|
||||
var cmd tea.Cmd
|
||||
m.runSpinner, cmd = m.runSpinner.Update(msg)
|
||||
@@ -353,6 +374,22 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.statusError = msg.Error
|
||||
m.statusRequest = ""
|
||||
}
|
||||
if msg.Type == protocol.SearchResults {
|
||||
if msg.ID == m.searchRequest && msg.SearchResults != nil {
|
||||
m.searchInFlight = false
|
||||
m.searchResults = msg.SearchResults.Results
|
||||
m.searchText = msg.SearchResults.Query
|
||||
m.searchError = ""
|
||||
m.commandIndex = min(m.commandIndex, max(0, len(msg.SearchResults.Results)-1))
|
||||
if m.searchQueued {
|
||||
m.searchQueued = false
|
||||
updated, cmd := m.requestSearch()
|
||||
m = updated.(Model)
|
||||
return m, tea.Batch(m.read(), cmd)
|
||||
}
|
||||
}
|
||||
return m, m.read()
|
||||
}
|
||||
if msg.Type == protocol.PipelineList || msg.Type == protocol.Submitted {
|
||||
m.notificationEndpoints = msg.NotificationEndpoints
|
||||
if msg.DefaultModel != "" {
|
||||
@@ -386,6 +423,11 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.requestedRunID = msg.RunDetail.ID
|
||||
m.runError = ""
|
||||
m.runStepIndex = min(m.runStepIndex, len(msg.RunDetail.Steps))
|
||||
if m.pendingRunNav != nil && m.pendingRunNav.runID == msg.RunDetail.ID {
|
||||
nav := *m.pendingRunNav
|
||||
m.pendingRunNav = nil
|
||||
m.applyRunNav(nav)
|
||||
}
|
||||
}
|
||||
} else if msg.Type == protocol.Pong {
|
||||
m.appendLine(fmt.Sprintf("pong #%s: %s", msg.ID, msg.Time))
|
||||
@@ -412,6 +454,13 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.keys.confirm = true
|
||||
}
|
||||
}
|
||||
if msg.ID != "" && msg.ID == m.searchRequest {
|
||||
m.searchInFlight = false
|
||||
m.searchQueued = false
|
||||
m.searchResults = nil
|
||||
m.searchText = ""
|
||||
m.searchError = msg.Error
|
||||
}
|
||||
} else if msg.Type == protocol.Submitted {
|
||||
m.templateConfirm = false
|
||||
m.draftOpen = false
|
||||
@@ -602,6 +651,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
if m.decisionOpen {
|
||||
return m.updateDecision(msg)
|
||||
}
|
||||
if m.artifactsOpen {
|
||||
return m.updateArtifacts(msg)
|
||||
}
|
||||
if m.runOpen && (msg.String() != ":" || m.runSearchOpen) {
|
||||
return m.updateRuns(msg)
|
||||
}
|
||||
@@ -630,6 +682,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.commandIndex = 0
|
||||
m.commandInput = newInput()
|
||||
if m.searchOpen {
|
||||
m.searchResults = nil
|
||||
m.searchText = ""
|
||||
m.searchError = ""
|
||||
m.commandInput.Placeholder = "Type to search…"
|
||||
return m, m.commandInput.Focus()
|
||||
}
|
||||
@@ -807,6 +862,9 @@ func (m Model) View() string {
|
||||
if m.decisionOpen {
|
||||
content = m.decisionView(bodyHeight)
|
||||
}
|
||||
if m.artifactsOpen {
|
||||
content = m.artifactsView(bodyHeight)
|
||||
}
|
||||
if m.mutationCommand != nil {
|
||||
paragraphs := []string{"This opens a new session/editor and may modify a retained draft.", "Published definitions and previous run history are unchanged."}
|
||||
if strings.Contains(m.mutationTitle, "debugging") {
|
||||
|
||||
Reference in New Issue
Block a user