Make a project a place you can open - #66
Merged
Merged
Conversation
An agent was pointed at a folder that had nowhere to be seen: no path, no
branch, no files, and no answer to "open this in my editor".
A project is now an object in the engine — `domain::ProjectEntry` — with its
path, branch, what is ahead, behind and uncommitted, the first level of its
tree and the agents pointed at it. It opens as its own tab, so a project can
sit beside the chat working in it. Agents and projects are checked against each
other in both directions: no agent works in an unlisted project, and no project
claims an agent that does not exist.
Open in editor is a menu of editors, each showing the exact command it would
run against this folder. `EditorApp::installed` is `Option<bool>` and is `None`
everywhere, because nothing has looked: resolving an application and launching
it belong to workbenchd. A test asserts no editor claims to be installed
without a check, so the honest answer cannot quietly become a hopeful one.
New project asks three things by clicking — where it comes from (a template, a
folder already on disk, a repository), where it goes, and what happens
afterwards — then prints the resulting path and every file and command
involved, above a button that says writing to disk is the daemon's work.
Two corrections came out of building this.
The prototype working tree claimed six changed files and listed four, and still
named paths from the Swift layout (`desktop/src/...`). The count is now the
list, the paths are the ones this repository actually has, and a test asserts
that exactly one project owns the reported working tree and that its dirty
count matches the changes shown. A project that is not that one counts its
changes and says why it cannot list them, rather than borrowing another
project's files.
Every filled button in the app was drawing white text on a transparent ground:
a later "lighter controls" rule set `.btn { background: transparent }` after
`.btn--primary` set its fill, and with equal specificity the last one won.
`Create`, `Save` and their kind are visible again.
Closes #62
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.
Change
An agent was pointed at a folder that had nowhere to be seen: no path, no branch, no files, and no answer to "open this in my editor".
A project is now an object in the engine.
domain::ProjectEntrycarries the path, branch, ahead, behind, uncommitted count, the first level of the tree and the agents pointed at it. It opens as its own tab, so a project can sit beside the chat that works in it. AProjectsarea joins the activity strip, listing each project and disclosing its first level under the open one.Agents and projects are checked in both directions: no agent works in an unlisted project, and no project claims an agent that does not exist.
Open in editor
A menu of editors, each showing the exact command it would run against this folder —
code ~/Projects/open-cube.EditorApp::installedisOption<bool>and isNonefor every entry, because nothing has looked: resolving an application and launching it belong toworkbenchd. A test asserts no editor claims to be installed without a check, so the honest answer cannot quietly become a hopeful one.New project
Three cards for where it comes from — a template, a folder already on disk, a repository — then where it goes, then what happens afterwards (version control, an editor, an agent). It prints the resulting path and every file and command involved above the button, which states that writing to disk is the daemon's work.
Two corrections found while building this
The prototype working tree lied. It claimed six changed files and listed four, and still named paths from the Swift layout (
desktop/src/...). The count is now the list, the paths are this repository's own, and a test asserts exactly one project owns the reported working tree and that its dirty count matches the changes shown. A project that is not that one counts its changes and says why it cannot list them, rather than borrowing another project's files.Every filled button was invisible. A later "lighter controls" rule set
.btn { background: transparent }after.btn--primaryset its fill; with equal specificity the last one won, soCreate,Saveand their kind were drawing white text on a transparent ground. Fixed by ordering, with a comment saying why the order matters, plus a disabled state.Validation
cargo test -p open-cube-core— 26 tests, three new (agents ↔ projects both ways; no editor claims installation; one project owns the reported working tree and its count matches).pnpm fallbackregenerated the preview snapshot;pnpm buildclean.git initand the editor command update live.Security impact
None. Nothing launches an application, opens a file dialog or writes to disk — each of those reports that it belongs to the daemon. The editor list is declarative and never probes the machine.
Closes #62.