Skip to content

feat: hatchet ui command#4395

Open
mnafees wants to merge 5 commits into
mainfrom
nafees/cli-ui-cmd
Open

feat: hatchet ui command#4395
mnafees wants to merge 5 commits into
mainfrom
nafees/cli-ui-cmd

Conversation

@mnafees

@mnafees mnafees commented Jul 10, 2026

Copy link
Copy Markdown
Member

Description

Add new hatchet ui subcommand to serve a full Hatchet frontend for self-hosted deployments with no frontend.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted
  • Documented (where applicable)

🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.
  • Details: [e.g. generating tests, writing docs]

@mnafees mnafees self-assigned this Jul 10, 2026
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Jul 10, 2026 12:01pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code labels Jul 10, 2026
@mnafees mnafees requested a review from Copilot July 10, 2026 11:39

Copilot AI left a comment

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.

Pull request overview

Adds a new hatchet ui CLI subcommand that serves an embedded Hatchet dashboard bundle locally and reverse-proxies API traffic to a selected Hatchet deployment/profile, targeting self-hosted/API-only installs that don’t ship a frontend.

Changes:

  • Introduces hatchet ui command implementation (embedded SPA serving + /api reverse proxy + browser auto-open).
  • Adds a build hook/script to compile the frontend and embed the output into the CLI binary for releases (plus Taskfile helpers).
  • Documents the new CLI command in the docs navigation and reference pages.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
Taskfile.yaml Adds tasks to build/embed the dashboard bundle into the CLI binary.
hack/build/embed-ui.sh Builds the frontend app and copies dist/ into the CLI’s embedded assets directory.
frontend/docs/pages/reference/cli/ui.mdx Adds reference documentation for hatchet ui.
frontend/docs/pages/reference/cli/index.mdx Mentions hatchet ui in the CLI feature list.
frontend/docs/pages/reference/cli/_meta.js Adds the new “Serving the Dashboard UI” page to the CLI docs nav.
cmd/hatchet-cli/cli/ui.go Implements the hatchet ui command, local server, SPA handler, and reverse proxy.
cmd/hatchet-cli/cli/internal/ui/ui.go Adds go:embed-backed accessors to bundled UI assets + Bundled() check.
cmd/hatchet-cli/cli/internal/ui/assets/.gitkeep Placeholder to keep the embedded assets directory in a clean checkout.
cmd/hatchet-cli/cli/internal/ui/.gitignore Ignores built UI assets while preserving .gitkeep.
cmd/hatchet-cli/.goreleaser.yml Runs the embed hook before building CLI artifacts.
.github/workflows/cli-release.yaml Installs Node + pnpm so the UI embed hook can run during CLI releases.

Comment thread cmd/hatchet-cli/cli/ui.go
Comment thread cmd/hatchet-cli/cli/ui.go
Comment thread cmd/hatchet-cli/cli/ui.go Outdated
Comment thread cmd/hatchet-cli/cli/ui.go Outdated
Comment thread cmd/hatchet-cli/cli/ui.go
Comment thread cmd/hatchet-cli/cli/ui.go Outdated
Comment thread cmd/hatchet-cli/cli/ui.go Outdated
Comment thread frontend/docs/pages/reference/cli/ui.mdx Outdated
Comment thread cmd/hatchet-cli/cli/ui.go
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The load-deadlock job failed on this PR (optimistic-scheduling=true). This check is non-mandatory and does not block merging, but may be worth investigating. View logs

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The load-deadlock job failed on this PR (optimistic-scheduling=false). This check is non-mandatory and does not block merging, but may be worth investigating. View logs

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The load-deadlock job failed on this PR (optimistic-scheduling=true). This check is non-mandatory and does not block merging, but may be worth investigating. View logs

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The load-deadlock job failed on this PR (optimistic-scheduling=true). This check is non-mandatory and does not block merging, but may be worth investigating. View logs

Comment thread cmd/hatchet-cli/cli/ui.go

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.

How does the UI "know" which tenant / tenant memberships to render? It seems like this would only work in no-auth mode, otherwise I can't see how this would work without modifying frontend code.

Comment thread cmd/hatchet-cli/cli/ui.go
}

mux := http.NewServeMux()
mux.Handle("/api/", proxy)

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 worry about this, users running hatchet ui will be opening a port with full access to their target tenant. There are lots of network misconfigurations where this would be particularly bad, for example Docker Desktop for a while had an issue where ports would be discoverable if you were bound to a network. Same with VPNs like Tailscale, lots of (mis)configurations would allow for remote access to this port.

I wonder if we should require some form of auth to the /api/ proxy which we control from the CLI process. Again, this would require some frontend changes to pass some kind of token through (perhaps can hook into the exchange token mechanism).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants