Skip to content

Show the code a task writes in a Code tab, and follow the task across the panel - #71

Merged
abhishek-anand merged 4 commits into
feat/code-edit-toolsfrom
feat/code-tab
Dec 3, 2026
Merged

abhishek-anand merged 4 commits into
feat/code-edit-toolsfrom
feat/code-tab

Conversation

@abhishek-anand

Copy link
Copy Markdown
Collaborator

Builds on #70.

  • Code tab: appears once a task writes a file. One tab per file, newest first, read-only, line numbers. An edit's changed lines are marked and scrolled into view. A file a command made (from 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.
  • Following the task: while a task of the open thread works, the panel turns to where it is. A command goes to Terminal, an edit to Code, and a browser action to Screen, or to the Mac browser when the task uses that. A tab the owner picks holds for the rest of that task. Taking control or a hidden panel also stops it.
  • Activity steps for the new tools say "Writing game.js" or "Editing game.js" with the path under them, and carry a Code badge.

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.

…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.
Copilot AI balanced review requested due to automatic review settings December 1, 2026 23:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread coderunner/server/web/app/app.js Outdated
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.
@abhishek-anand
abhishek-anand merged commit 480f1ff into feat/code-edit-tools Dec 3, 2026
@abhishek-anand
abhishek-anand deleted the feat/code-tab branch December 3, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants