Skip to content

Commit f0b990d

Browse files
committed
docs(dev-mode): document branch preview setup
1 parent 45f20ca commit f0b990d

2 files changed

Lines changed: 100 additions & 40 deletions

File tree

docs/dev-mode-branch-preview.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Branch Preview Dev Mode
2+
3+
Branch Preview is a local maintainer tool for checking another git branch from the Hermes Web UI. It is intentionally hidden from ordinary users and should be treated as a developer/reviewer feature, not a normal application setting.
4+
5+
## Who should use it
6+
7+
Use Branch Preview only on trusted local instances where a super administrator is reviewing code changes.
8+
9+
Ordinary users should not see this feature. Super administrators can find it under:
10+
11+
```text
12+
Settings → Advanced → Developer tools → Branch preview
13+
```
14+
15+
## Security model
16+
17+
Branch Preview builds code from the selected branch inside a local worktree. Building untrusted branches can execute untrusted build scripts or dependencies.
18+
19+
Keep it disabled unless all of these are true:
20+
21+
- you trust the repository checkout;
22+
- you trust the branch or understand the risk;
23+
- the instance is local/private;
24+
- the current user is a super administrator.
25+
26+
Client-side hiding is only UX. Server-side super-admin guards and persisted Dev Mode checks remain authoritative.
27+
28+
## Requirements
29+
30+
- Hermes Web UI is running from a local git checkout.
31+
- The server process can run `git` in that checkout.
32+
- The server process can create/remove worktrees under the active Hermes profile directory.
33+
- The user is `super_admin`.
34+
- `dev.enabled` is enabled before build/reset actions are allowed.
35+
36+
Read-only branch listing/status can be available before `dev.enabled` is enabled so a maintainer can select a branch without a catch-22. Mutating actions still require persisted Dev Mode to be enabled.
37+
38+
## Generic maintainer setup
39+
40+
Use the normal branch names for your checkout. By default, Branch Preview falls back to `main`.
41+
42+
Example profile config:
43+
44+
```yaml
45+
dev:
46+
enabled: true
47+
review_base: main
48+
preview_branch: main
49+
```
50+
51+
Then open the Web UI as a super administrator and use:
52+
53+
```text
54+
Settings → Advanced → Developer tools → Branch preview
55+
```
56+
57+
## Unavailable states
58+
59+
The UI may show a compact unavailable message instead of controls:
60+
61+
- `not_git_repo` — the Web UI server is not running from a git checkout.
62+
- `repo_path_missing` — a future explicit repo path setting points to a missing checkout.
63+
- `disabled` — branch preview is disabled for this instance/user.
64+
65+
When unavailable, the UI should not render branch/build/reset controls.
66+
67+
## Troubleshooting
68+
69+
1. Confirm the server working directory is a git checkout:
70+
71+
```bash
72+
git rev-parse --is-inside-work-tree
73+
```
74+
75+
2. Confirm branches are visible:
76+
77+
```bash
78+
git for-each-ref --format='%(refname:short)' refs/heads refs/remotes
79+
```
80+
81+
3. Confirm the profile has the intended base branch:
82+
83+
```yaml
84+
dev:
85+
enabled: true
86+
review_base: main
87+
```
88+
89+
4. If build/reset buttons are disabled, save Dev Mode settings first. The UI switch edits draft state; build/reset use the persisted server config.

packages/client/src/i18n/locales/en.ts

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export default {
219219
status: 'Show session status and queue',
220220
abort: 'Stop the active bridge run',
221221
queue: 'Queue a message behind the active run',
222+
plan: 'Write a markdown implementation plan',
222223
clear: 'Clear the current display',
223224
clearHistory: 'Delete this session’s stored message history',
224225
title: 'Rename this session',
@@ -1327,46 +1328,6 @@ export default {
13271328

13281329
// Changelog
13291330
changelog: {
1330-
new_0_5_22_1: 'Fix Hermes session list API reading the Web UI local session store instead of the Hermes profile database',
1331-
new_0_5_23_1: 'Add bridge-only chat slash commands with localized command suggestions',
1332-
new_0_5_23_2: 'Persist command history for session replay without polluting model context, usage, or compression',
1333-
new_0_5_23_3: 'Isolate gateway profile environment variables to prevent credentials leaking across profiles',
1334-
new_0_5_23_4: 'Reserve the Web UI port during gateway allocation to avoid startup conflicts',
1335-
new_0_5_23_5: 'Fix self-update restart handling so successful helper exits are not reported as failures',
1336-
new_0_5_24_1: 'Align Bridge chat with API Server handling for multimodal input, system prompt, and workspace context',
1337-
new_0_5_25_1: 'Add group chat room reset and clone actions',
1338-
new_0_5_25_2: 'Make the Web UI state directory configurable for custom deployment layouts',
1339-
new_0_5_25_3: 'Add MiMo as a TTS provider in voice settings',
1340-
new_0_5_25_4: 'Fetch custom provider model lists through the backend to avoid browser CORS failures',
1341-
new_0_5_25_5: 'Fix tool approval flow for bridge sessions',
1342-
new_0_5_25_6: 'Remove the forced CLI platform hint from bridge prompts so custom media/file instructions are preserved',
1343-
new_0_5_25_7: 'Show base64 image content correctly in user message history',
1344-
new_0_5_25_8: 'Add Playwright browser tests, chat streaming contract coverage, provider model coverage, and coverage baseline',
1345-
new_0_5_26_1: 'Support Windows and local Markdown media paths in chat history and rendered messages',
1346-
new_0_5_26_2: 'Filter empty assistant history and clear stale compression status when a new run starts',
1347-
new_0_5_26_3: 'Add locked file writes for config and profile updates to reduce concurrent write corruption',
1348-
new_0_5_26_4: 'Add QQBot and DingTalk channel settings',
1349-
new_0_5_26_5: 'Make CLI port detection portable and improve mobile terminal drawer sizing',
1350-
new_0_5_26_6: 'Isolate Bridge profile environments and fix Hermes plugin discovery across Python environments',
1351-
new_0_5_26_7: 'Explain stopped gateway states with Web UI diagnostics and keep log loading state stable',
1352-
new_0_5_26_8: 'Fix session reset mode options, custom provider base URL handling, and dynamic deliver targets',
1353-
new_0_5_26_9: 'Add a local tool-call trace visibility toggle in the chat input bar',
1354-
new_0_5_26_10: 'Support Hermes Agent package installs when no source checkout is available',
1355-
new_0_5_26_11: 'Add xAI Grok OAuth login for SuperGrok subscription users and update Grok model presets',
1356-
new_0_5_26_12: 'Expand browser, chat streaming, provider, gateway, config, plugin, and Bridge test coverage',
1357-
new_0_5_27_1: 'Add session-level model settings for Bridge chats, with independent provider and model saved per session',
1358-
new_0_5_27_2: 'Right-click a Bridge session and choose Set Model to switch the model for that session',
1359-
new_0_5_27_3: 'Runs now validate the session model and fall back to the current default model when the saved model is unavailable',
1360-
new_0_5_27_4: 'Context compression now follows the current Profile default selected model by default',
1361-
new_0_5_30_1: 'Bridge chat now preserves structured history, fixing intermittent no-response and skipped tool execution caused by text-flattened tool history',
1362-
new_0_5_30_2: 'Group chat mention routing is more reliable for multiple agents, removes each agent’s own @ mention before delivery, and keeps user display names bound after refresh',
1363-
new_0_5_30_3: 'Model pages, chat model dropdowns, and session model selection now scope providers and models to the active Profile with accurate default markers',
1364-
new_0_5_30_4: 'Gateway management is simplified: the standalone Gateway page is removed, each Profile is checked for platform configuration before starting the needed gateway, and a lightweight gateway runner handles starts and restarts',
1365-
new_0_5_30_5: 'Improve Gateway startup across Docker, Termux, and Windows with runtime-lock handling, port-conflict cleanup, background execution, and restart support',
1366-
new_0_5_30_6: 'Harden Windows compatibility for path detection, file downloads, and job/update subprocesses so they no longer flash terminal windows',
1367-
new_0_5_30_7: 'Fix config writes and provider presets: validate .env keys, route FUN-Codex through the Responses API, and refresh Z.AI/GLM model lists',
1368-
new_0_5_30_8: 'Polish frontend details including collapsed sidebar layout, short group labels, sidebar divider, and conversation outline styling',
1369-
new_0_5_30_9: 'Context compression now follows Profile compression settings and hardens stale snapshots by reusing previous summaries with a safe tail instead of recompressing full history',
13701331
new_0_5_31_1: "Harden Bridge broker restarts, fix final group-chat stream rendering, and add {'@'}all routing for group chat",
13711332
new_0_5_31_2: 'File manager can copy absolute paths, and the mobile session drawer overlay no longer falls behind chat content',
13721333
new_0_5_31_3: 'Profile selector now shows avatars, custom avatar uploads, runtime status modal, and gateway/profile restart actions',
@@ -1404,6 +1365,16 @@ export default {
14041365
new_0_6_0_6: 'Update docs and website copy for account management, default credentials, account/Profile management, uploads/downloads, and bundled media skills',
14051366
new_0_6_0_7: 'Add CLI maintenance commands for clearing login IP locks and resetting the default admin / 123456 login',
14061367
new_0_6_0_8: 'Version 0.6.0 is the boundary between single-user and multi-user Web UI. If multi-user mode causes issues, please file an issue and roll back to the 0.5.35 single-user release if needed',
1368+
new_0_6_1_1: 'Session lists now show every Profile available to the account unless a Profile filter is explicitly selected, and CLI start/stop/status no longer print the node:sqlite experimental warning',
1369+
new_0_6_1_2: 'Clarify and confirmation replies now travel through the authenticated chat socket to the Hermes bridge, with response-path tests',
1370+
new_0_6_1_3: 'Navigation entries and chat session rows now use native links for open-in-new-tab, copy-link, and persistent collapsed sidebar behavior',
1371+
new_0_6_1_4: 'Session links no longer leak route Profile filters into the normal session list, and Open in new tab labels are localized',
1372+
new_0_6_1_5: 'Skills now read skills.external_dirs from the active Profile config, mark external skills, preserve local precedence, and resolve external files',
1373+
new_0_6_1_6: 'Login IP lockout now allows 10 failed attempts and the locked login screen shows clear-lock and reset-default-login recovery commands',
1374+
new_0_6_1_7: 'Mobile and background chat disconnects are treated as transient, then reconnect resumes the run state from the server',
1375+
new_0_6_1_8: 'Bridge tool marker flushing now persists partial tool-call marker prefixes at tool and run boundaries',
1376+
new_0_6_1_9: 'Profile-aware history actions now delete sessions with profile-qualified targets and refresh History when the global Profile changes',
1377+
new_0_6_1_10: 'The legacy AUTH_DISABLED bypass was removed for multi-user permissions, while AUTH_TOKEN remains supported',
14071378

14081379
},
14091380
}

0 commit comments

Comments
 (0)