Skip to content

Add Hazel build info to bottom bar of editor#2315

Open
CyrusD123 wants to merge 5 commits into
devfrom
build-info-bottom-bar
Open

Add Hazel build info to bottom bar of editor#2315
CyrusD123 wants to merge 5 commits into
devfrom
build-info-bottom-bar

Conversation

@CyrusD123
Copy link
Copy Markdown
Contributor

Displays the git information for the current Hazel build in the bottom right of the editor, in the format branch@short-sha (with a hyperlink to GitHub), and an additional -dirty suffix if there are additional uncommitted local changes. Originally written by @7h3kk1d, but since it would be helpful to add this functionality for agent evaluation, I want to help this get merged as well.

7h3kk1d and others added 2 commits May 12, 2026 15:40
Generates a BuildInfo module at build time via a dune rule that runs
git rev-parse and git status, then renders branch@shortsha on the right
side of #bottom-bar. Dirty working trees show a pencil glyph and italic
text instead of a clickable GitHub commit link.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@CyrusD123 CyrusD123 self-assigned this May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.92%. Comparing base (d2e85b3) to head (78b4db5).

Files with missing lines Patch % Lines
src/web/Settings.re 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2315   +/-   ##
=======================================
  Coverage   50.91%   50.92%           
=======================================
  Files         300      300           
  Lines       39867    39872    +5     
=======================================
+ Hits        20300    20303    +3     
- Misses      19567    19569    +2     
Files with missing lines Coverage Δ
src/web/app/common/Icons.re 100.00% <100.00%> (ø)
src/web/Settings.re 0.76% <0.00%> (-0.03%) ⬇️

... and 12 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.

@7h3kk1d
Copy link
Copy Markdown
Contributor

7h3kk1d commented May 20, 2026

My ideas: It would be nice if the branch was linkable separate to the commit so you can get to the branch url in github or the specific commit.

@disconcision's original notes to me:

i feel like it maybe doesn't need to show all the time? like maybe it's normally just a git icon, and hovering over it slides out to the above? or if you want it for screenshots maybe make it click icon to toggle to full. i don't think that long term we want to burn an entire corner on just this, so icon plus fold out feels like a good stub to me for suggesting a future menu or whatever. also radius is off, use the one from the gamma icon. width equal to the sidebar menu width. or just have the icon w/o outline, either works

I think that on dev we probably don't want this visible all the time so making the toggle change andrew suggested sounds good. On other branches/commits I would probably make it default show so you know somewhere other than the url what version you're on.

++ (BuildInfo.dirty ? "-dirty" : "");
let inner = text(label);
let body =
BuildInfo.dirty || BuildInfo.ahead
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should consider doing another class/symbol to represent that this is ahead rather than just using dirty since it's helpful to have a link to an existing commit on github even if there's local changes.

I'm also somewhat ambivalent of removing the link if the commit isn't on github since it only happens in dev workflows and the link starts working after you push. I could see it either way though.

@CyrusD123
Copy link
Copy Markdown
Contributor Author

The build info now slides out from a git icon on the bottom right, animated and styled to be similar to the cursor inspector:

Screenshot 2026-05-24 at 11 09 11 PM Screenshot 2026-05-24 at 11 08 51 PM

The branch and commit are also linked separately now. In the case where a commit is local but not on GitHub yet, I'm still using the "dirty" CSS styling (though the commit hash doesn't have the "-dirty" suffix). If you prefer that we just not handle that case I'm pretty ambivalent as well. Or maybe we could link to the most recent commit on GitHub as well as show the current commit hash?

@7h3kk1d
Copy link
Copy Markdown
Contributor

7h3kk1d commented May 28, 2026

I like the look of the bar now. It's a little confusing that if you click on it it doesn't go away because you're still hovering it. I wonder if we can make it go away and just reappear when you hover again. @disconcision might have more styling opinions though.

Sidenote: this also links to the local branch name on github which could not be the upstream branch name. I don't think many people are doing this so I'm not really concerned but it could be something we try to handle.

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