Skip to content

Project Mode#2048

Open
russell-rozenbaum wants to merge 54 commits intodevfrom
project-mode
Open

Project Mode#2048
russell-rozenbaum wants to merge 54 commits intodevfrom
project-mode

Conversation

@russell-rozenbaum
Copy link
Contributor

@russell-rozenbaum russell-rozenbaum commented Nov 29, 2025

Project Mode with Coding Agent

Before Merge

  • Split out project mode code and have a PR that just enables agentic assistant in docs/scratch mode
  • Resolve Andrew's comments (special fold - unit test, deleted backpack code)

After Merge

  • Tab to view actions/documentation for actions
  • Improve header readability and descriptiveness of tool calls
  • Add ability for agent to write tests for its own code
  • Allow for agent to write probes
  • Add check for concave grout after edit actions
  • General prompt improvement
  • Working project mode
  • Additional UI work on stepping through / exploring chats
  • Make agent available in tutorial and exercises mode

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 25.71023% with 1046 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.80%. Comparing base (062397c) to head (3ae9ff1).
⚠️ Report is 109 commits behind head on dev.

Files with missing lines Patch % Lines
src/haz3lcore/CompositionCore/OpenRouter.re 0.00% 200 Missing ⚠️
src/haz3lcore/CompositionCore/HighLevelNodeMap.re 46.15% 154 Missing ⚠️
.../view/ProjectModeCore/FileSystemCore/FileSystem.re 22.72% 153 Missing ⚠️
src/haz3lcore/CompositionCore/CompositionView.re 2.58% 113 Missing ⚠️
src/haz3lcore/CompositionCore/CompositionGo.re 55.19% 82 Missing ⚠️
src/haz3lcore/CompositionCore/GeneralTreeUtils.re 44.59% 41 Missing ⚠️
src/web/app/editors/lines/LineNumbers.re 0.00% 36 Missing ⚠️
src/util/API.re 0.00% 30 Missing ⚠️
src/util/StringUtil.re 0.00% 30 Missing ⚠️
...web/view/ProjectModeCore/AgentCore/AgentGlobals.re 3.57% 27 Missing ⚠️
... and 32 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2048      +/-   ##
==========================================
- Coverage   50.40%   48.80%   -1.60%     
==========================================
  Files         230      241      +11     
  Lines       25365    26954    +1589     
==========================================
+ Hits        12784    13156     +372     
- Misses      12581    13798    +1217     
Files with missing lines Coverage Δ
src/haz3lcore/derived/Measured.re 61.00% <100.00%> (+0.74%) ⬆️
src/haz3lcore/lang/Token.re 81.25% <ø> (ø)
src/haz3lcore/zipper/Printer.re 89.36% <100.00%> (+2.40%) ⬆️
src/haz3lcore/zipper/action/Introduce.re 80.37% <ø> (ø)
src/language/proof/ProofCtx.re 40.42% <ø> (ø)
src/language/statics/StaticsBase.re 45.71% <ø> (ø)
src/web/app/common/Icons.re 100.00% <100.00%> (ø)
src/web/debug/DebugConsole.re 0.00% <ø> (ø)
src/web/init/Init.re 57.14% <ø> (ø)
src/haz3lcore/tiles/Secondary.re 76.00% <0.00%> (-3.17%) ⬇️
... and 41 more

... and 21 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cyrus- cyrus- mentioned this pull request Jan 12, 2026
8 tasks
@CyrusD123 CyrusD123 self-assigned this Feb 6, 2026
@russell-rozenbaum russell-rozenbaum marked this pull request as ready for review February 7, 2026 02:34
Copy link
Member

@disconcision disconcision left a comment

Choose a reason for hiding this comment

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

Here's a basic review of the integration layer. I think we should make some changes but probably nothing too substantial i dont think. Short notice for this afternoon's meeting; if you have a chance to glance over we can discuss, otherwise can discuss later in the week or next if you are available. some comments are just questions i'm not totally sure about it, mostly about functionality that has moved.

A few things to break out:

  • I think the internal printer changes you made are probably both unnecessary and may have broken the probe tests; or at least something did. lmk if you don't know what my in-file comments about this mean.
  • I didn't look at the agent-specific stuff in depth but Agent.re is 1723 lines, effectively a god module containing Model + Update + Store for the agent, chat system, and messages all in one file. Should be split soon if not now
  • OLD_ASSISTANT/ directory — 2048 lines of fully commented-out dead code
  • 5 accidentally committed JSON chat logs (NewChat_openrouter_*.json) scattered in source directories — debug artifacts, not test fixtures (maybe add to .gitignore if these are getting generated automatically?)
  • HighLevelNodeMap is 786 lines with complex diff logic — could use documentation (not necessary immediately tho)
  • CSS files are large (~1272 lines for chat messages) — likely fine for now but suggest component-scoped styles later
  • empty files committed (Test_Info.re, Test_MatchExp.re, Test_Stepper.re, DebugConsole.re), just mode changes, no content

Copy link
Member

Choose a reason for hiding this comment

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

are these for the code maps? can we see if it's possible to add these by putting folds directly on the segment structure before sending it to the printer to avoid a special case at this level? if it's easier to put them on the term instead this should now be possible, as maketerm and exp_to_segment now retain whitespace/comments with appropriate settings. lmk if there's complexity here.

(also nbd but ideally avoid re-ordering existing params like projector_to_segment to simplify merge conflicts)

Copy link
Contributor Author

@russell-rozenbaum russell-rozenbaum Feb 16, 2026

Choose a reason for hiding this comment

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

by putting folds directly on the segment structure

I'm not sure what this means. Maybe we can talk about it in person/call.

~refractor_seg_to_seg,
~projector_to_segment,
~special_folds,
~refractors: list((Id.t, _))=[],
Copy link
Member

Choose a reason for hiding this comment

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

can you say why you added a default here? piece_to_string is an internal function that we should be cautious about calling independently; probably better to be explicit about its arguments. ideally we avoid having to call it at all but sometimes special cases must be made. open to discussion here.

Copy link
Member

Choose a reason for hiding this comment

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

ah okay i get this now... nevermind what i said earlier about putting folds on through seg/term. but instead i think what you're doing here can be done by wrapping projector_to_segment and special-casing what happens with folds. then just call the regular printer with that special projector_to_segment; i don't think any modification to the printer here is necessary. the special projector_to_segment should basically replace projectors which single convex tiles whose label is ["⋱"]; lmk if you don't get what i mean

Copy link
Contributor Author

@russell-rozenbaum russell-rozenbaum Feb 16, 2026

Choose a reason for hiding this comment

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

sounds good, still might be helpful to talk over a call, this isn't trivial to me. id still be happy to try to understand more about it


// AddToolLabel_1.0: Make the action types (above) and add their cases to the funs (below)
[@deriving (show({with_path: false}), sexp, yojson, eq)]
type agent_editor_action =
Copy link
Member

Choose a reason for hiding this comment

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

we can probably call these something like structural_actions instead as in principle they are not agent specific

@@ -286,7 +286,7 @@
justify-content: center;
}

#top-bar #editor-mode .icon:hover {
Copy link
Member

Choose a reason for hiding this comment

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

why was this removed? not necessarily bad but I wonder if it might have adverse consequences, ie this now adds a hover effect to icons not within the editor-mode element, which is not obviously desirable

NinjaKeys.initialize(Shortcut.options(schedule_action));
JsUtil.focus_clipboard_shim();
/* Setup scroll listener for floating elements (backpack) */
FloatingElement.setup_scroll_listener();
Copy link
Member

Choose a reason for hiding this comment

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

i don't think this should be removed; this will break the backpack z-index i think

Copy link
Member

Choose a reason for hiding this comment

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

more mode changes

@dm0n3y
Copy link
Contributor

dm0n3y commented Feb 16, 2026

I can't seem to switch to project mode (testing this on hazel.org/build/project-mode). Keep getting an unhandled exception with the message "No current file" in console. This persists after clearing local storage. Has anyone else encountered this?

dm0n3y and others added 6 commits February 16, 2026 11:55
@russell-rozenbaum
Copy link
Contributor Author

I can't seem to switch to project mode (testing this on hazel.org/build/project-mode). Keep getting an unhandled exception with the message "No current file" in console. This persists after clearing local storage. Has anyone else encountered this?

this comes from Page.Update.get_editor. dev seems to use this function, but our branch never had this. When resolving the merge conflicts, I attempted to remove it, but the Probes tool in the Sidebar seems to deeply depend on it. @disconcision do you know if we need get_editor in Page.Update? I believe Probes is the only thing that depends on it now.

russell-rozenbaum and others added 8 commits February 16, 2026 17:11
…ines

Factor out the special_folds boolean from the printer by routing fold
abbreviation through the existing projector_to_segment mechanism. Also
restores the refractor_seg_to_seg call in Base.re and the
FloatingElement scroll listener in Main.re, both lost during the
dev merge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@disconcision
Copy link
Member

@russell-rozenbaum: Made the folds change I described, and also re-added a dropped line from dev which was causing some probes tests to fail. see: 386090f

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.

5 participants

Comments