Repository navigation
The Runs pages are Harbor's (0.19.0) - #24
Merged
Merged
Conversation
… and Stop Harbor::RunsController serves /factory/runs, /factory/runs/:id, …/raw and POST …/stop, and the menu's Runs entry is the engine's own route. A site with no code of its own gets both pages whole: a run's name and status, its agent, model, cost and tokens, where it ran, its command, the runs it delegated with what each cost, its events, its live log, its error, input and output. While a run is under way its page refreshes every five seconds and the log is a window that stays on its newest line. Both pages wrap instead of scrolling sideways on a phone. A host adds to a run's page with partials in its own app/views/harbor/runs/, rendered when they exist: _show_actions (buttons beside Stop), _show_meta (the end of the header's first line) and _show_extras (sections of its own). It replaces how an agent is shown (_agent) and the details card (_details) with a partial of the same name, which Rails finds before the engine's. What is code is a method on the run class or one hook: Run.for_page(filters) is what the list holds, #delegated_runs the cost breakdown, #raw_log_file the download, and config.run_stop stops a run that isn't an agent session. Without the hook, Stop is offered for sessions and queued runs only. harbor_run_link is always a link now, and starting a database operation goes to the run's page.
adamfortuna
force-pushed
the
runs-pages
branch
from
November 14, 2026 21:33
f957ced to
bc6f7fa
Compare
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.
What
The Runs list and a run's own page move into Harbor, with the raw stream download and Stop:
GET /factory/runs,GET /factory/runs/:id,GET /factory/runs/:id/raw,POST /factory/runs/:id/stopinHarbor::RunsController; the menu's Runs entry is the engine's own route.harbor--log-follow). A finished run's log is all on the page.Where a host plugs in
Partials in the host's
app/views/harbor/runs/, rendered when they exist:_show_actionsrun_show_metarun_show_extrasrunPartials of Harbor's that a host replaces with one of the same name (an application's views are found before an engine's; a test checks the order):
_agentrun,detail_detailsrunCode, not markup:
config.run_stop = ->(run, user) { … }returns a notice or raises. Without it, Stop is offered for agent sessions and queued runs only.Harbor::Run.for_page(filters),#delegated_runs,#raw_log_file: overridable on the host's run class.Also
harbor--details: a<details>stays as the reader left it across a morph.harbor_run_linkis always a link; starting a database operation redirects to the run's page.Tests
test/runs_pages_test.rb(33 tests): the list, the run's page, the live log, events, raw download, delegated runs, Stop (session, queued, neither), therun_stophook, each host partial present and absent, both overrides, the page switch, login, the nav. 527 runs, 0 failures; rubocop clean.Not checked in a browser.