Repository navigation
Show the code a task writes in a Code tab, and follow the task across the panel - #71
Merged
Merged
Conversation
…e the task works A Code tab appears once a task writes a file: a tab per file, read-only, with the lines an edit changed marked and brought into view; a file a command made is read from the sandbox when opened. While a task of the open thread works, the panel turns to its terminal for a command, its screen for the browser and its code for an edit. A tab the owner picks holds for the rest of that task.
There was a problem hiding this comment.
🟡 Changes recommended
Active issues prevent the first write from opening Code, fail to preserve an explicit System and models tab selection, and allow stale reads to overwrite newer or another thread’s content.
3 open issues
What changed in this PR
Builds on #70’s sandbox file tools with a read-only Code tab and task-following panel navigation.
Changes:
- Displays file tabs, line numbers, and highlighted edits; loads command-created files on demand.
- Adds automatic panel switching with manual-selection, control, and visibility guards.
- Adds file-writing activity labels, paths, and Code badges.
| File | Description |
|---|---|
| coderunner/server/web/app/index.html | Adds the Code tab and file-viewer structure. |
| coderunner/server/web/app/app.js | Implements file rendering, task following, and activity labels. |
| coderunner/server/web/app/app.css | Styles file tabs, code lines, highlights, and panel layout. |
Review effort: Balanced
| this.items = this.say(itemCards(this.shown, picture)); | ||
| break; | ||
| case "plan": this.showPlan(e.steps); break; | ||
| case "file": case "files_changed": codeSaw(e, state.running.has(this.id)); break; |
Comment on lines
+2035
to
+2039
| } catch (err) { | ||
| if (code.open === wanted) box.replaceChildren(el("div", "code-note", err.message)); | ||
| return; | ||
| } | ||
| if (code.open !== wanted) return; |
| $("viewScreen").onclick = () => { ownerPicked(); setView("screen"); }; | ||
| $("viewTerminal").onclick = () => { ownerPicked(); setView("terminal"); }; | ||
| $("viewCode").onclick = () => { ownerPicked(); setView("code", false); }; | ||
| $("viewBrowser").onclick = () => { ownerPicked(); setView("browser"); }; |
…r write overtook The write's tool event comes before its file, so with nothing to show the panel went to Screen and stayed there. A live file now applies the follow, unless the owner picked a tab. A read of a file a command changed is dropped if a newer write of that file came while it was read.
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.

Builds on #70.
files_changed) is shown in italics and read from the sandbox when opened. Shown as text only: nothing the assistant wrote runs or renders here.Checked in headless Chrome against the real page, with the server answers and event stream stubbed to replay a coding task: the panel went Terminal, Code (edit lines marked), Terminal, Screen, and stayed on Terminal when picked mid-task. A command-made file loaded on click.