Compare commits

..
Author SHA1 Message Date
Bailey Dixon 523794995a feat(dashboard): redesign Hermes-Relay plugin UI 2026-08-30 13:52:29 -04:00
Bailey Dixon 834763a213 Merge pull request #463 from Codename-11/fix/android-remove-chat-clean-mode
fix(android): remove chat clean focus mode
2026-08-27 20:20:15 -04:00
Bailey Dixon 8ef6b794b2 Merge remote-tracking branch 'origin/dev' into fix/android-remove-chat-clean-mode 2026-08-27 20:08:01 -04:00
Bailey Dixon 17d8a2374a fix(android): remove chat clean focus mode 2026-08-27 20:07:43 -04:00
Bailey Dixon 274ae11160 Merge pull request #462 from Codename-11/docs/pr-intake-external-only
docs: limit PR intake to external contributors
2026-08-27 19:56:52 -04:00
Bailey Dixon 9cebdb67e6 docs: limit PR intake to external contributors 2026-08-27 19:54:49 -04:00
Bailey Dixon ee300b3b15 Merge pull request #460 from Codename-11/docs/triage-assignment-pr-intake
docs: document triage ownership and PR intake
2026-08-27 18:32:20 -04:00
Bailey Dixon 2b75577fcf docs: document triage ownership and PR intake 2026-08-27 18:05:11 -04:00
Bailey Dixon ff2f94922b Merge pull request #459 from Codename-11/docs/pull-request-template
docs: add canonical pull request template
2026-08-27 16:10:29 -04:00
Bailey Dixon 292cc94eb4 docs: add canonical pull request template 2026-08-26 21:47:45 -04:00
Bailey Dixon 621081b633 Merge pull request #458 from Codename-11/docs/triage-bot-attribution
docs: identify automated triage bot
2026-08-26 21:01:18 -04:00
Bailey Dixon da8e822b66 docs: identify automated triage bot 2026-08-26 20:51:32 -04:00
Bailey Dixon 0015a913f1 Merge pull request #457 from Codename-11/feature/android-whats-new-highlights
feat(android): improve What's New release highlights
2026-08-26 20:40:10 -04:00
Bailey Dixon 0f47e464f3 Merge remote-tracking branch 'origin/dev' into feature/android-whats-new-highlights 2026-08-26 20:20:26 -04:00
Bailey Dixon 2411cf19b3 Merge pull request #456 from Codename-11/chore/hermes-issue-triage-docs
docs: document bounded issue triage
2026-08-26 20:13:55 -04:00
Bailey Dixon 51b4edd52a Merge remote-tracking branch 'origin/dev' into feature/android-whats-new-highlights
# Conflicts:
#	app/src/main/kotlin/com/hermesandroid/relay/ui/RelayApp.kt
#	docs/localization-status.json
2026-08-26 20:02:24 -04:00
Bailey Dixon d3c4e90696 docs: document bounded issue triage 2026-08-26 19:59:01 -04:00
Bailey Dixon cd7cad03ec Merge pull request #455 from Codename-11/feature/native-git-workspace
feat(android): add first-class native Git workspace
2026-08-26 19:46:35 -04:00
Bailey Dixon bea3021ef0 Merge remote-tracking branch 'origin/dev' into feature/android-whats-new-highlights
# Conflicts:
#	CHANGELOG.md
2026-08-26 19:17:57 -04:00
Bailey Dixon 00a9a7efcb feat(android): improve What's New release highlights 2026-08-26 19:17:09 -04:00
Bailey Dixon 7a97b71844 docs: publish native git workspace references 2026-08-26 19:09:15 -04:00
Bailey Dixon ae51ae3ab1 Merge origin/dev into feature/native-git-workspace 2026-08-26 19:03:31 -04:00
Bailey Dixon 1bdcab8fc0 feat(android): add native git workspace surfaces 2026-08-26 19:03:21 -04:00
Bailey Dixon 0c77d010fa Merge pull request #454 from Codename-11/fix/android-smooth-sphere-motion
fix(android): keep visible sphere motion smooth
2026-08-26 18:51:23 -04:00
Bailey Dixon dc18209c3c fix(android): keep visible sphere motion smooth 2026-08-26 18:18:03 -04:00
Bailey Dixon 69347adb34 Merge pull request #445 from Codename-11/chore/reconcile-android-1.13.2
chore: reconcile Android 1.13.2 into dev
2026-08-25 21:36:11 -04:00
Bailey Dixon 43a809e41a chore: reconcile android-v1.13.2 into dev 2026-08-25 21:25:01 -04:00
Bailey Dixon a5cc0104bf Merge pull request #443 from Codename-11/fix/android-1.13.2-no-git
release(android): android-v1.13.2
2026-08-25 20:38:04 -04:00
Bailey Dixon 86a0bebc0d fix(ci): avoid untrusted upstream checkout 2026-08-25 20:21:22 -04:00
Bailey Dixon 04d9421c74 release(android): android-v1.13.2 2026-08-25 20:10:35 -04:00
Bailey Dixon 14401aa3c3 Merge pull request #441 from Codename-11/fix/android-session-activity-fallback
fix(android): keep unknown session activity neutral

(cherry picked from commit d5cce4e390)
2026-08-25 20:02:24 -04:00
Bailey Dixon 99897274c6 Merge pull request #440 from Codename-11/chore/automate-hotfix-backmerge
feat(ci): automate conflict-free release backmerges

(cherry picked from commit 96a9e8077e)
2026-08-25 20:02:20 -04:00
Bailey Dixon 20c5b690a8 Merge pull request #439 from Codename-11/fix/android-supervised-return-blank
fix(android): stabilize supervised parent relock

(cherry picked from commit 4317da85fd)
2026-08-25 20:02:16 -04:00
Bailey Dixon dc86c043bc Merge pull request #419 from Codename-11/feature/android-supervised-mode
feat(android): add supervised mode

(cherry picked from commit 5580c9d9bb)
2026-08-25 20:02:11 -04:00
Bailey Dixon d5cce4e390 Merge pull request #441 from Codename-11/fix/android-session-activity-fallback
fix(android): keep unknown session activity neutral
2026-08-25 19:41:41 -04:00
Bailey Dixon ae9b22a9e6 fix(android): keep unknown session activity neutral 2026-08-25 19:01:25 -04:00
Bailey Dixon 96a9e8077e Merge pull request #440 from Codename-11/chore/automate-hotfix-backmerge
feat(ci): automate conflict-free release backmerges
2026-08-25 17:12:49 -04:00
Bailey Dixon a97e6a2b14 chore: merge current dev into release backmerge automation 2026-08-25 16:53:13 -04:00
Bailey Dixon 4317da85fd Merge pull request #439 from Codename-11/fix/android-supervised-return-blank
fix(android): stabilize supervised parent relock
2026-08-25 16:24:42 -04:00
Bailey Dixon 45fde0ad9a feat(ci): automate conflict-free release backmerges 2026-08-25 16:21:14 -04:00
114 changed files with 5996 additions and 2569 deletions
+47
View File
@@ -0,0 +1,47 @@
## Summary
<!-- Describe the user/developer outcome and why this change is needed. Link related issues, e.g. Closes #123. -->
## Changes
<!-- List the focused implementation changes. Avoid repeating the commit log. -->
-
## Verification
<!-- List exact commands and results. Say explicitly when a check was not run or when device/UI proof remains outstanding. -->
-
## Screenshots
<!-- UI change: include screenshots/video plus device, viewport, or emulator details. Otherwise write: No visual change. -->
## Compatibility / risk
<!-- Note Standard Hermes/upstream compatibility, migrations/state changes, security/privacy impact, rollout/rollback, or write N/A. -->
## Lineage / contributor credit
<!-- Preserve prior contributor work when replacing, salvaging, or rebuilding another PR. -->
- Source PR(s): N/A
- Attribution preserved by: N/A
## Checklist
<!-- Check an item when satisfied or when its N/A rationale is stated above. -->
- [ ] Target branch is `dev`, unless this is a `dev` → `main` release PR or a focused production-tag hotfix PR to `main`
- [ ] Scope is focused and related issues/PRs are linked
- [ ] Android changes: lint and focused tests ran, or rationale is listed above
- [ ] Translation changes: locale validation/review ran, or N/A is listed above
- [ ] Server/plugin changes: focused tests ran, or N/A/rationale is listed above
- [ ] Desktop changes: build/tests ran, or N/A/rationale is listed above
- [ ] Docs/site changes: build or link/route checks ran, or N/A/rationale is listed above
- [ ] UI changes were tested on a relevant device/emulator/desktop surface, or the missing proof is stated above
- [ ] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)
- [ ] `CHANGELOG.md` is updated for user-visible changes, or N/A is listed above
- [ ] Public writing hygiene checked: no secrets, private infrastructure, personal names, or AI/process narration
- [ ] Salvaged/replacement work links source PRs and preserves contributor authorship, or N/A is listed above
+5 -1
View File
@@ -3,8 +3,11 @@
function classifyCiPaths(paths) {
const forceAll = paths.some((path) => [
'.github/workflows/ci-required.yml',
'.github/workflows/release-backmerge.yml',
'.github/scripts/classify-ci-paths.cjs',
'.github/scripts/classify-ci-paths.test.cjs',
'scripts/plan_release_backmerge.py',
'scripts/tests/plan_release_backmerge_test.py',
].includes(path));
const exact = (values) => paths.some((path) => values.includes(path));
const under = (prefixes) => paths.some((path) => prefixes.some((prefix) => path.startsWith(prefix)));
@@ -13,7 +16,8 @@ function classifyCiPaths(paths) {
android: forceAll || under(['app/', 'relay-core/', 'relay-ui/', 'ui-preview/', 'quest/', 'gradle/']) || exact([
'build.gradle.kts', 'settings.gradle.kts', 'gradle.properties', 'gradlew', 'gradlew.bat',
'scripts/check-android-locales.py', 'scripts/android-locale-harness.py',
'scripts/check-android-collection-apis.py', '.github/workflows/ci-android.yml',
'scripts/check-android-collection-apis.py', 'scripts/check-android-release-notes.py',
'scripts/tests/check_android_release_notes_test.py', '.github/workflows/ci-android.yml',
'.github/workflows/play-preflight-android.yml',
'.github/workflows/approve-release-android.yml',
'.github/workflows/release-android.yml',
@@ -15,6 +15,7 @@ const none = {
assert.deepEqual(classifyCiPaths(['README.md']), none);
assert.deepEqual(classifyCiPaths(['desktop/src/cli.ts']), { ...none, desktop: true });
assert.deepEqual(classifyCiPaths(['relay-core/src/main/kotlin/Wire.kt']), { ...none, android: true });
assert.deepEqual(classifyCiPaths(['scripts/check-android-release-notes.py']), { ...none, android: true });
assert.deepEqual(classifyCiPaths(['plugin/relay/server.py']), { ...none, plugin: true });
assert.deepEqual(classifyCiPaths(['plugin/dashboard/src/App.tsx']), { ...none, dashboard: true });
assert.deepEqual(classifyCiPaths(['user-docs/index.md']), { ...none, docs: true });
@@ -30,5 +31,13 @@ assert.deepEqual(classifyCiPaths(['.github/workflows/ci-required.yml']), {
contract: true,
docs: true,
});
assert.deepEqual(classifyCiPaths(['.github/workflows/release-backmerge.yml']), {
android: true,
desktop: true,
plugin: true,
dashboard: true,
contract: true,
docs: true,
});
console.log('CI path classification tests passed.');
+7
View File
@@ -33,6 +33,8 @@ on:
- "scripts/check-android-locales.py"
- "scripts/android-locale-harness.py"
- "scripts/check-android-collection-apis.py"
- "scripts/check-android-release-notes.py"
- "scripts/tests/check_android_release_notes_test.py"
- ".github/workflows/ci-android.yml"
- ".github/workflows/play-preflight-android.yml"
- ".github/workflows/approve-release-android.yml"
@@ -73,6 +75,11 @@ jobs:
- name: Reject unsafe Android collection APIs
run: python3 scripts/check-android-collection-apis.py
- name: Validate Android release notes
run: |
python3 scripts/check-android-release-notes.py
python3 -m unittest scripts.tests.check_android_release_notes_test
- name: Run Android lint
run: ./gradlew lint --console=plain
+40 -18
View File
@@ -11,6 +11,9 @@
name: CI — Upstream Contract
permissions:
contents: read
on:
workflow_call:
push:
@@ -40,45 +43,64 @@ jobs:
steps:
- name: Checkout hermes-relay
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Resolve upstream ref
id: ref
env:
REQUESTED_REF: ${{ github.event.inputs.upstream_ref }}
run: |
set -euo pipefail
# PR/push runs use a known-good NousResearch/hermes-agent commit so
# normal CI is stable. The weekly schedule below intentionally tracks
# main as the upstream-drift siren.
DEFAULT_REF="ef4b897a1843cd32c4f141f55db60f0f0602cc98"
if [ "${{ github.event_name }}" = "schedule" ]; then
REF="main" # weekly drift siren
elif [ -n "${{ github.event.inputs.upstream_ref }}" ]; then
REF="${{ github.event.inputs.upstream_ref }}" # manual override
elif [ -n "$REQUESTED_REF" ]; then
REF="$REQUESTED_REF" # manual override
else
REF="$DEFAULT_REF"
fi
# The ref is passed to git below, so reject option-like or malformed
# values before it reaches that boundary. Full commit IDs and normal
# branch/tag names remain supported for manual contract checks.
if [[ "$REF" == -* ]] ||
! git check-ref-format --allow-onelevel "$REF" >/dev/null; then
echo "FAIL: invalid upstream branch or tag name." >&2
exit 1
fi
echo "ref=$REF" >> "$GITHUB_OUTPUT"
echo "Checking standard-path route contract against upstream ref: $REF"
- name: Checkout vanilla upstream (no plugin, no bootstrap)
uses: actions/checkout@v7
with:
repository: NousResearch/hermes-agent
ref: ${{ steps.ref.outputs.ref }}
path: _upstream
fetch-depth: 1
- name: Extract trusted upstream contract sources
env:
UPSTREAM_REF: ${{ steps.ref.outputs.ref }}
run: |
set -euo pipefail
UPSTREAM_GIT="$RUNNER_TEMP/hermes-agent-contract.git"
git init --bare "$UPSTREAM_GIT"
git -C "$UPSTREAM_GIT" remote add origin \
"https://github.com/NousResearch/hermes-agent.git"
git -C "$UPSTREAM_GIT" fetch --no-tags --depth=1 origin -- "$UPSTREAM_REF"
UPSTREAM_COMMIT="$(git -C "$UPSTREAM_GIT" rev-parse 'FETCH_HEAD^{commit}')"
mkdir -p _upstream/gateway/platforms _upstream/hermes_cli
git -C "$UPSTREAM_GIT" show \
"$UPSTREAM_COMMIT:gateway/platforms/api_server.py" \
> _upstream/gateway/platforms/api_server.py
git -C "$UPSTREAM_GIT" show \
"$UPSTREAM_COMMIT:hermes_cli/web_server.py" \
> _upstream/hermes_cli/web_server.py
echo "Extracted contract sources from upstream commit: $UPSTREAM_COMMIT"
- name: Set up Python 3.11
uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Assert upstream checkout is vanilla (no relay bootstrap/plugin)
run: |
if [ -e "_upstream/hermes_relay_bootstrap" ] || \
[ -e "_upstream/plugin/hermes_relay_bootstrap" ] || \
find _upstream -name "hermes_relay_bootstrap.pth" 2>/dev/null | grep -q .; then
echo "FAIL: upstream checkout contains a relay bootstrap — not vanilla."; exit 1
fi
echo "OK: upstream checkout carries no relay plugin/bootstrap."
- name: Run route-surface contract
run: python scripts/check-upstream-route-contract.py "_upstream"
+53 -2
View File
@@ -10,6 +10,16 @@ on:
pull_request:
branches: [main, dev]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
inputs:
base_sha:
description: "Exact base commit for a trusted release-backmerge candidate"
required: true
type: string
head_sha:
description: "Exact candidate commit to check"
required: true
type: string
permissions:
contents: read
@@ -31,22 +41,63 @@ jobs:
contract: ${{ steps.filter.outputs.contract }}
docs: ${{ steps.filter.outputs.docs }}
steps:
- name: Checkout repository
- name: Checkout pull request merge
if: github.event_name == 'pull_request'
uses: actions/checkout@v7
with:
fetch-depth: 2
- name: Checkout exact dispatched candidate
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ inputs.head_sha }}
- name: Test path classifier
run: node .github/scripts/classify-ci-paths.test.cjs
- name: Classify changed files
id: filter
uses: actions/github-script@v8
env:
DISPATCH_BASE_SHA: ${{ inputs.base_sha }}
DISPATCH_HEAD_SHA: ${{ inputs.head_sha }}
with:
script: |
let diffArgs;
if (context.eventName === 'workflow_dispatch') {
const base = process.env.DISPATCH_BASE_SHA || '';
const head = process.env.DISPATCH_HEAD_SHA || '';
const shaPattern = /^[0-9a-f]{40}$/;
if (!shaPattern.test(base) || !shaPattern.test(head)) {
core.setFailed('Exact-tree dispatch requires full 40-character base/head SHAs.');
return;
}
const { stdout: checkedOut } = await exec.getExecOutput(
'git',
['rev-parse', 'HEAD'],
);
if (checkedOut.trim() !== head) {
core.setFailed(`Checked out ${checkedOut.trim()}, expected ${head}.`);
return;
}
const ancestry = await exec.exec(
'git',
['merge-base', '--is-ancestor', base, head],
{ ignoreReturnCode: true },
);
if (ancestry !== 0) {
core.setFailed(`Candidate ${head} does not descend from base ${base}.`);
return;
}
diffArgs = ['diff', '--name-only', base, head];
} else {
diffArgs = ['diff', '--name-only', 'HEAD^1', 'HEAD^2'];
}
const { stdout } = await exec.getExecOutput(
'git',
['diff', '--name-only', 'HEAD^1', 'HEAD^2'],
diffArgs,
);
const paths = stdout.split(/\r?\n/).filter(Boolean);
const { classifyCiPaths } = require(
+1 -1
View File
@@ -81,10 +81,10 @@ jobs:
- name: Validate release metadata and source compatibility
run: |
python3 scripts/check-version-tracks.py
python3 scripts/check-android-release-notes.py
python3 scripts/check-privacy-policy.py --live
python3 scripts/check-android-locales.py
python3 scripts/check-android-collection-apis.py
python3 -m json.tool app/src/main/assets/changelog.json >/dev/null
- name: Decode release keystore
env:
+20
View File
@@ -150,6 +150,7 @@ jobs:
- name: Validate release metadata and Android API compatibility
run: |
python3 scripts/check-version-tracks.py
python3 scripts/check-android-release-notes.py
python3 scripts/check-privacy-policy.py
python3 scripts/check-android-locales.py
python3 scripts/check-android-collection-apis.py
@@ -365,3 +366,22 @@ jobs:
find app/build/outputs/apk -name '*.apk' -exec ls -la {} + >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
find app/build/outputs/bundle -name '*.aab' -exec ls -la {} + >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
echo '```' >> "$GITHUB_STEP_SUMMARY"
request-backmerge:
name: Request stable release backmerge
needs: [validate, release]
if: needs.validate.outputs.prerelease != 'true'
permissions:
actions: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Dispatch fail-closed release reconciliation
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: android-v${{ needs.validate.outputs.version }}
run: |
gh workflow run release-backmerge.yml \
--repo "$GITHUB_REPOSITORY" \
--ref main \
-f release_tag="$RELEASE_TAG"
+267
View File
@@ -0,0 +1,267 @@
# Reconcile a completed stable hotfix into dev without adding a ceremonial PR
# merge commit. Normal dev -> main releases are detected and intentionally no-op.
# A conflicted merge, failed exact-tree CI, stale dev ref, or denied branch update
# stops without mutating dev and falls back to the normal reconciliation PR path.
name: Release Backmerge
on:
workflow_dispatch:
inputs:
release_tag:
description: "Published stable tag to reconcile (android-v*, server-v*, or desktop-v*)"
required: true
type: string
permissions:
contents: read
concurrency:
group: release-backmerge-dev
cancel-in-progress: false
jobs:
prepare:
name: Prepare exact backmerge candidate
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
outcome: ${{ steps.prepare.outputs.outcome }}
base_dev_sha: ${{ steps.prepare.outputs.base_dev_sha }}
candidate_branch: ${{ steps.prepare.outputs.candidate_branch }}
candidate_sha: ${{ steps.prepare.outputs.candidate_sha }}
release_commit: ${{ steps.prepare.outputs.release_commit }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: main
- name: Validate release and prepare merge commit
id: prepare
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.release_tag }}
shell: bash
run: |
set -euo pipefail
if [[ ! "$RELEASE_TAG" =~ ^(android|server|desktop)-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error::Release Backmerge accepts stable SemVer production tags only; got $RELEASE_TAG"
exit 1
fi
git fetch origin \
"+refs/heads/main:refs/remotes/origin/main" \
"+refs/heads/dev:refs/remotes/origin/dev" \
"+refs/tags/${RELEASE_TAG}:refs/tags/${RELEASE_TAG}"
release_commit="$(git rev-parse "${RELEASE_TAG}^{commit}")"
base_dev_sha="$(git rev-parse origin/dev)"
echo "release_commit=$release_commit" >> "$GITHUB_OUTPUT"
echo "base_dev_sha=$base_dev_sha" >> "$GITHUB_OUTPUT"
if ! git merge-base --is-ancestor "$release_commit" origin/main; then
echo "::error::$RELEASE_TAG ($release_commit) is not contained in origin/main"
exit 1
fi
read -r is_draft is_prerelease < <(
gh release view "$RELEASE_TAG" --json isDraft,isPrerelease \
--jq '[.isDraft, .isPrerelease] | @tsv'
)
if [ "$is_draft" != "false" ] || [ "$is_prerelease" != "false" ]; then
echo "::error::$RELEASE_TAG is not a published stable GitHub release"
exit 1
fi
plan="$(
python3 scripts/plan_release_backmerge.py \
--release-commit "$release_commit" \
--dev-commit "$base_dev_sha"
)"
case "$plan" in
already-contained)
echo "outcome=noop" >> "$GITHUB_OUTPUT"
echo "## Release backmerge not needed" >> "$GITHUB_STEP_SUMMARY"
echo "\`$RELEASE_TAG\` is already contained in \`dev\`." >> "$GITHUB_STEP_SUMMARY"
exit 0
;;
normal-release)
echo "outcome=noop" >> "$GITHUB_OUTPUT"
echo "## Normal release: no backmerge" >> "$GITHUB_STEP_SUMMARY"
echo "The released merge's integration parent is already contained in \`dev\`." >> "$GITHUB_STEP_SUMMARY"
exit 0
;;
hotfix) ;;
*)
echo "::error::Unknown release-backmerge plan: $plan"
exit 1
;;
esac
candidate_branch="chore/release-backmerge/${RELEASE_TAG}-${GITHUB_RUN_ID}"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git switch --detach "$base_dev_sha"
set +e
git merge --no-ff -m "chore: back-merge ${RELEASE_TAG}" "$release_commit"
merge_status=$?
set -e
if [ "$merge_status" -ne 0 ]; then
conflicts="$(git diff --name-only --diff-filter=U | paste -sd ', ' -)"
echo "outcome=conflict" >> "$GITHUB_OUTPUT"
echo "::error::Automatic backmerge conflicts: ${conflicts:-unknown}. Open a reconciliation PR."
echo "## Manual reconciliation PR required" >> "$GITHUB_STEP_SUMMARY"
echo "\`$RELEASE_TAG\` conflicts with current \`dev\`: ${conflicts:-unknown}." >> "$GITHUB_STEP_SUMMARY"
git merge --abort || true
exit 1
fi
candidate_sha="$(git rev-parse HEAD)"
first_parent="$(git rev-parse HEAD^1)"
second_parent="$(git rev-parse HEAD^2)"
if [ "$first_parent" != "$base_dev_sha" ] || [ "$second_parent" != "$release_commit" ]; then
echo "::error::Candidate parents do not match dev + release commit"
exit 1
fi
git push origin "$candidate_sha:refs/heads/$candidate_branch"
echo "outcome=candidate" >> "$GITHUB_OUTPUT"
echo "candidate_branch=$candidate_branch" >> "$GITHUB_OUTPUT"
echo "candidate_sha=$candidate_sha" >> "$GITHUB_OUTPUT"
echo "## Backmerge candidate prepared" >> "$GITHUB_STEP_SUMMARY"
echo "- Release: \`$RELEASE_TAG\` (\`$release_commit\`)" >> "$GITHUB_STEP_SUMMARY"
echo "- Dev base: \`$base_dev_sha\`" >> "$GITHUB_STEP_SUMMARY"
echo "- Candidate: \`$candidate_sha\`" >> "$GITHUB_STEP_SUMMARY"
echo "- Temporary ref: \`$candidate_branch\`" >> "$GITHUB_STEP_SUMMARY"
gate:
name: Run exact-tree required checks
needs: prepare
if: needs.prepare.outputs.outcome == 'candidate'
permissions:
actions: write
contents: read
runs-on: ubuntu-latest
timeout-minutes: 45
outputs:
check_run_id: ${{ steps.gate.outputs.check_run_id }}
steps:
- name: Dispatch and await Required checks
id: gate
env:
GH_TOKEN: ${{ github.token }}
BASE_DEV_SHA: ${{ needs.prepare.outputs.base_dev_sha }}
CANDIDATE_BRANCH: ${{ needs.prepare.outputs.candidate_branch }}
CANDIDATE_SHA: ${{ needs.prepare.outputs.candidate_sha }}
shell: bash
run: |
set -euo pipefail
gh workflow run ci-required.yml \
--repo "$GITHUB_REPOSITORY" \
--ref "$CANDIDATE_BRANCH" \
-f base_sha="$BASE_DEV_SHA" \
-f head_sha="$CANDIDATE_SHA"
check_run_id=""
for _ in {1..20}; do
check_run_id="$(
gh run list \
--repo "$GITHUB_REPOSITORY" \
--workflow ci-required.yml \
--branch "$CANDIDATE_BRANCH" \
--event workflow_dispatch \
--limit 20 \
--json databaseId,headSha \
--jq ".[] | select(.headSha == \"$CANDIDATE_SHA\") | .databaseId" \
| head -n 1
)"
if [ -n "$check_run_id" ]; then
break
fi
sleep 3
done
if [ -z "$check_run_id" ]; then
echo "::error::Required checks dispatch was not observed for $CANDIDATE_SHA"
exit 1
fi
echo "check_run_id=$check_run_id" >> "$GITHUB_OUTPUT"
gh run watch "$check_run_id" --repo "$GITHUB_REPOSITORY" --exit-status
promote:
name: Compare-and-swap dev
needs: [prepare, gate]
if: needs.prepare.outputs.outcome == 'candidate' && needs.gate.result == 'success'
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: main
- name: Fast-forward dev to the tested candidate
env:
BASE_DEV_SHA: ${{ needs.prepare.outputs.base_dev_sha }}
CANDIDATE_BRANCH: ${{ needs.prepare.outputs.candidate_branch }}
CANDIDATE_SHA: ${{ needs.prepare.outputs.candidate_sha }}
RELEASE_COMMIT: ${{ needs.prepare.outputs.release_commit }}
shell: bash
run: |
set -euo pipefail
git fetch origin --no-tags \
"+refs/heads/dev:refs/remotes/origin/dev" \
"+refs/heads/$CANDIDATE_BRANCH:refs/remotes/origin/$CANDIDATE_BRANCH"
current_dev="$(git rev-parse origin/dev)"
remote_candidate="$(git rev-parse "origin/$CANDIDATE_BRANCH")"
if [ "$current_dev" != "$BASE_DEV_SHA" ]; then
echo "::error::dev moved from $BASE_DEV_SHA to $current_dev; rerun or open a reconciliation PR"
exit 1
fi
if [ "$remote_candidate" != "$CANDIDATE_SHA" ]; then
echo "::error::Candidate ref moved from $CANDIDATE_SHA to $remote_candidate"
exit 1
fi
if [ "$(git rev-parse "$CANDIDATE_SHA^1")" != "$BASE_DEV_SHA" ] || \
[ "$(git rev-parse "$CANDIDATE_SHA^2")" != "$RELEASE_COMMIT" ]; then
echo "::error::Candidate ancestry changed after verification"
exit 1
fi
# The explicit lease is the atomic stale-base guard. The update is a
# fast-forward from BASE_DEV_SHA; no unrelated history can be replaced.
git push \
--force-with-lease="refs/heads/dev:$BASE_DEV_SHA" \
origin "$CANDIDATE_SHA:refs/heads/dev"
git push origin --delete "$CANDIDATE_BRANCH" || \
echo "::warning::Could not remove temporary branch $CANDIDATE_BRANCH"
echo "## Release backmerge complete" >> "$GITHUB_STEP_SUMMARY"
echo "Fast-forwarded \`dev\` from \`$BASE_DEV_SHA\` to tested merge \`$CANDIDATE_SHA\`." >> "$GITHUB_STEP_SUMMARY"
fallback:
name: Report PR fallback
needs: [prepare, gate, promote]
if: always() && needs.prepare.outputs.outcome == 'candidate' && needs.promote.result != 'success'
runs-on: ubuntu-latest
steps:
- name: Preserve safe fallback instructions
env:
CANDIDATE_BRANCH: ${{ needs.prepare.outputs.candidate_branch }}
CANDIDATE_SHA: ${{ needs.prepare.outputs.candidate_sha }}
CHECK_RUN_ID: ${{ needs.gate.outputs.check_run_id }}
run: |
echo "## Automatic backmerge stopped" >> "$GITHUB_STEP_SUMMARY"
echo "\`dev\` was not updated. Open or refresh a reconciliation PR after addressing the failed/stale gate." >> "$GITHUB_STEP_SUMMARY"
echo "- Candidate ref: \`${CANDIDATE_BRANCH:-not-created}\`" >> "$GITHUB_STEP_SUMMARY"
echo "- Candidate SHA: \`${CANDIDATE_SHA:-n/a}\`" >> "$GITHUB_STEP_SUMMARY"
echo "- Required-check run: \`${CHECK_RUN_ID:-n/a}\`" >> "$GITHUB_STEP_SUMMARY"
+19
View File
@@ -539,3 +539,22 @@ jobs:
release-assets/cli-binaries/hermes-relay-darwin-arm64
release-assets/cli-windows-installer/hermes-relay-windows-x64-setup.exe
release-assets/SHA256SUMS.txt
request-backmerge:
name: Request stable release backmerge
needs: [validate-release, publish-release]
if: ${{ !contains(needs.validate-release.outputs.version, '-') }}
permissions:
actions: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Dispatch fail-closed release reconciliation
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: desktop-v${{ needs.validate-release.outputs.version }}
run: |
gh workflow run release-backmerge.yml \
--repo "$GITHUB_REPOSITORY" \
--ref main \
-f release_tag="$RELEASE_TAG"
+19
View File
@@ -138,3 +138,22 @@ jobs:
dist/*.whl
dist/*.tar.gz
dist/SHA256SUMS.txt
request-backmerge:
name: Request stable release backmerge
needs: [validate, package]
if: ${{ !contains(needs.validate.outputs.version, '-') }}
permissions:
actions: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Dispatch fail-closed release reconciliation
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: server-v${{ needs.validate.outputs.version }}
run: |
gh workflow run release-backmerge.yml \
--repo "$GITHUB_REPOSITORY" \
--ref main \
-f release_tag="$RELEASE_TAG"
+43 -1
View File
@@ -28,7 +28,7 @@ not redefine the branch, release, or hotfix policy here and in `RELEASE.md`.
| Staging source | An exact tested `dev` SHA or release-candidate tag; staging is an environment, never a branch |
| Production source | Immutable `android-v*`, `server-v*`, or `desktop-v*` tags, selected by surface |
| Hotfix base | The immutable production tag for the affected surface |
| Back-merge target | `dev`; merge `main` back immediately after every hotfix |
| Back-merge target | `dev`; stable hotfixes reconcile automatically when the exact tested merge is conflict-free, otherwise through a PR |
Feature completion means merged and verified on `dev`; it does not mean
released. A release train is separate work owned by a Forge release
@@ -37,6 +37,14 @@ open the `dev` → `main` release PR, tag the resulting `main` tip, publish the
surface artifacts, deploy or roll out, and verify the live result. Never create
a staging branch.
A normal `dev` → `main` release needs no back-merge: the released integration
parent is already in `dev`. A production-tag hotfix is different. After its
stable release succeeds, `Release Backmerge` prepares a `dev`-first merge
commit, runs the same path-aware required checks on that exact SHA, verifies
that `dev` has not moved, and fast-forwards `dev`. Conflicts, failed checks,
stale refs, or denied branch updates fail closed and require a reconciliation
PR; never resolve those cases by choosing a side automatically.
### Local integration discipline
- Fetch `origin/dev` before creating a task branch or worktree; do not base new
@@ -94,6 +102,40 @@ a staging branch.
- Prioritize findings that warrant holding the merge. State the impacted path
and the concrete failure mode.
## Automated public issue triage
New public issues may receive one clearly labeled **Hermes-Relay automated
triage** reply. That first response may classify the report with existing
type/area labels, point to related issues or current code/docs, ask for safe
sanitized diagnostics, and flag the thread for maintainer review.
GitHub attributes that reply to the repository-scoped
`hermes-relay-triage[bot]` App, never to a maintainer's personal account.
The automated lane may assign only the fixed maintainer account `Codename-11`
as follow-up ownership; that assignment does not imply acceptance, priority,
implementation, or a release commitment. It never closes, milestones,
prioritizes, promises a fix/release/timeline, chooses another assignee, or
continues replying after its first response. A related issue is not
automatically a duplicate. Human maintainer comments and decisions remain
authoritative; read the complete live thread before acting on an issue.
## Automated public PR intake
New external-contributor, non-draft pull requests may receive one clearly
labeled **Hermes-Relay automated PR intake** reply from
`hermes-relay-triage[bot]`. Owner-authored `Codename-11` PRs and bot PRs are
dropped before model dispatch. For eligible PRs, the intake compares the live PR
metadata/body and changed-path list with trusted `origin/dev` policy and
`.github/pull_request_template.md` without checking out or executing contributor
code. It may add genuine area labels plus `documentation`, `ci`, or
`needs-maintainer-review` and point out missing intake evidence.
The automated lane never approves, requests changes, merges, closes, assigns,
requests reviewers, milestones, prioritizes, pushes commits, edits PR text,
reruns workflows, applies `review-candidate`, or claims code correctness. Human
maintainer review and CI remain authoritative.
## Public-repo writing hygiene
Everything committed is public. In CHANGELOG, DEVLOG, README, docs, and release
+25 -1
View File
@@ -6,8 +6,33 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
## [Unreleased]
### Added
- **Android presents Relay Git as a first-class native workspace.** A compact optional Chat rail opens repository status, line totals, filters, diffs, branches, staging, commits, and remotes; the full workspace remains available from Settings when Chat controls are hidden.
- **Hermes-Relay Plugin provides a bounded Git workspace API for authenticated Dashboard clients.** Configured repository roots, path validation, tracked line totals, scoped write grants, and explicit confirmation protect repository reads and mutations.
### Changed
- **Hermes-Relay Dashboard management is organized around operator tasks.** Overview, Devices, Activity, Remote Access, Git, and Settings now have separate native Dashboard surfaces; pairing is QR-first, paired clients use responsive cards, and token-backed media is labeled as a bounded diagnostic instead of a health counter.
- **Android What's New leads with one curated release highlight without interrupting startup.** A timed post-update toast can be swiped or closed, previews additional feature/fix counts when a release has meaningful secondary items, expands into the centered highlight view on request, and keeps the full technical history available. Each release can present one plain-language summary, up to three primary benefits, and up to two quieter improvements, while release checks keep the structured entry, fallback, Play copy, and public release records aligned.
### Fixed
- **The visible Android Sphere keeps its smooth procedural motion across startup and chat.** Backgrounded and motion-disabled surfaces remain still without reducing foreground animation to a stepped ambient pulse.
### Removed
- **Android Chat no longer includes the hidden clean-focus presentation.** The long-press gesture, overlapping instructional pill, reduced composer, and alternate fading transcript were removed so Chat keeps one complete interaction model. Voice Focus remains available.
## [Android 1.13.2] - 2026-08-25
### Added
- **Android Supervised Mode presents a parent-controlled, profile-pinned chat surface.** Parents can limit attachments, Standard voice, generated media, conversation history, actions, and technical metadata while device authentication protects full settings. Hermes-Relay can identify and revoke a paired supervised client without becoming the policy enforcement boundary.
### Fixed
- **Android session rows stay neutral when optional live activity is unavailable or still loading.** Directory refreshes no longer restore a persistent Checking state, and full-row activity borders are reserved for actual Starting or Working turns.
- **Returning from parent settings keeps Supervised Chat rendered.** Parent access now relocks without rebuilding the active navigation graph, and full Settings keeps a prominent shortcut back to Supervised Mode controls.
## [Android 1.13.1] - 2026-08-25
@@ -23,7 +48,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
- **Provider usage and limits are available from top-level Settings.** Codex credential pools, Nous balances, and OpenCode Go account windows share one provider-neutral screen with Summary, Expanded, and Hidden presentation modes. Provider credentials remain on the Hermes host.
- **Android Bot Mode provides one messenger-style workspace across saved Hermes gateways.** Bots and read-only group rooms aggregate without changing the foreground connection, Bot Chats retain exact gateway/profile ownership, and unavailable gateways keep clearly marked last-known roster entries.
- **Android Assistant screen context.** Compatible unlocked assistant-button invocations can open Hermes, begin listening, and include bounded visible text plus an available screenshot in the first Standard voice turn. Ordinary wake and keyguard invocations remain screen-context free.
- **Android Supervised Mode presents a parent-controlled, profile-pinned chat surface.** Parents can limit attachments, Standard voice, generated media, conversation history, actions, and technical metadata while device authentication protects full settings. Hermes-Relay can identify and revoke a paired supervised client without becoming the policy enforcement boundary.
### Changed
+35
View File
@@ -104,6 +104,24 @@ The legacy `relay_server/` directory is a thin compatibility shim around `plugin
| **CI/CD** | GitHub Actions (lint, build, test, signed APK artifacts) |
| **Min SDK** | 26 (Android 8.0) / Target SDK 36 |
## Issues and automated triage
New issues may receive one first response headed **Hermes-Relay automated
triage**. It reads the live report against current code, documentation, related
issues, and public release state; it may add existing type/area labels and ask
for a focused, safe diagnostic such as the app version, interaction mode, or a
sanitized log excerpt.
GitHub displays the response as authored by `hermes-relay-triage[bot]`, a
repository-scoped App rather than a maintainer's personal account.
That reply is an acknowledgement and initial analysis, not a maintainer
decision. The automated path may assign `Codename-11` as the fixed owner for
follow-up, but assignment does not mean acceptance, priority, implementation,
or a release commitment. It does not close issues, choose another assignee, set
milestones or priority, promise a fix or release, or continue the conversation.
A maintainer will follow up on the thread.
## Running the Relay Locally
Only needed if you're working on the bridge, voice, notifications, or media features. Chat alone doesn't need the relay.
@@ -145,6 +163,23 @@ documentation fixes.
`main` is release history, not the normal contribution target; it receives
approved release PRs from `dev` and focused hotfix PRs based on production tags.
Pull requests use [the repository template](.github/pull_request_template.md).
Keep the body grounded: describe the outcome and focused changes, list exact
verification, include visual evidence when applicable, state compatibility or
risk, and preserve contributor lineage when replacing or salvaging prior work.
Check an item when it is satisfied or when its N/A rationale is written in the
body; do not use checked boxes as a substitute for evidence.
New external-contributor, non-draft pull requests may receive one
**Hermes-Relay automated PR intake** reply from `hermes-relay-triage[bot]`.
Owner-authored `Codename-11` PRs and bot PRs skip this lane. For eligible PRs,
the bot checks the live body, base branch, changed-path areas, template
completeness, stated verification, visual proof, and lineage without checking
out or executing contributor code. It may add bounded area/intake labels and
identify missing evidence, but it does not review code correctness, approve,
request changes, merge, close, assign, request reviewers, push commits, edit the
PR, rerun workflows, or select review bundles.
`origin/dev` is the canonical integration ref. Keep local `dev` as a clean,
fast-forward-only mirror and create each task in its own branch/worktree from the
current `origin/dev`. Do not accumulate unpublished commits on local `dev`. If a
+48
View File
@@ -1,5 +1,53 @@
# Hermes-Relay — Dev Log
## 2026-08-27 — Fixed issue ownership and bounded PR intake
The automated issue first-response lane now assigns only `Codename-11` when the
maintainer is absent. The assignee is fixed in the write wrapper rather than
chosen by webhook or model output, and represents follow-up ownership only—not
acceptance, priority, implementation, or a release promise.
A separate pull-request route now handles external-contributor, non-bot,
non-draft `opened`, `reopened`, and `ready_for_review` events. Owner-authored
`Codename-11` PRs are dropped before model dispatch. Eligible PRs are read from
live metadata plus trusted `dev` policy/template without executing contributor
code; the route applies only bounded area/intake labels and posts one
App-authored intake reply. It cannot approve, request changes, merge, close,
assign, request reviewers, push, edit PR text, rerun CI, select
`review-candidate`, or claim correctness. The external-contributor production
canary retained its exact head/base/open state and proved marker idempotency.
## 2026-08-26 — Canonical pull request intake contract
The repository now supplies one pull request template derived from the structure
already used by successful Android, plugin, desktop, docs, release, and salvage
PRs. It asks for a concise summary, focused changes, exact verification, visual
evidence when applicable, compatibility/risk notes, contributor lineage, and the
existing cross-surface checklist.
Checkboxes require evidence or an explicit N/A rationale. The template does not
turn every surface into a mandatory test lane, does not replace CI or maintainer
review, and keeps normal work targeting `dev` while preserving the documented
release/hotfix exceptions.
## 2026-08-26 — Bounded public issue triage contract
New GitHub issues may receive one clearly identified Hermes-Relay automated
triage response grounded in the live report, current code and documentation,
related open/closed issues, and verified public release state. The lane may add
existing type/area labels, request focused sanitized diagnostics, and flag a
thread for maintainer review.
The automated path is intentionally not an issue-lifecycle owner: it cannot
close, assign, milestone, prioritize, promise a fix/release/timeline, or continue
replying after the first response. Replies identify themselves as automated and
explicitly hand the remaining decision to a maintainer. Contributor guidance and
agent instructions carry the same boundary.
Public labels and comments are attributed to the repository-scoped
`hermes-relay-triage[bot]` GitHub App rather than a maintainer's personal
account. The App identity does not expand the bounded action contract.
## 2026-08-24 — Single dev integration authority
`origin/dev` is the sole integration authority. Primary local `dev` checkouts are
+5
View File
@@ -159,6 +159,11 @@ manual fallbacks when QR or clipboard transfer is unavailable.
</tr>
</table>
<p align="center">
<img src="assets/screenshots/supplemental/15_git_workspace.png" alt="Native Git workspace showing repository changes, an inline diff, and staging controls" width="260"><br>
<sub><b>Native Git workspace</b> — optional Hermes-Relay plugin</sub>
</p>
### Simplified Chinese
<table>
+92 -21
View File
@@ -200,6 +200,11 @@ never create a staging branch. Stable production tags are cut only from the new
10. Build and publish that surface's artifacts, roll out or deploy from the
immutable tag, and verify the release and live environment.
Do not back-merge a normal release. The `main` release merge already has the
released `dev` tip as its integration parent, so merging it back only adds
history noise. The release-backmerge workflow detects this topology and exits
successfully without changing `dev`.
### Branch names
| Prefix | When | Example |
@@ -258,7 +263,9 @@ The intended settings are:
- **`main`** — PRs required; `Required checks` required and current; force push
and deletion blocked. Normal work does not target this branch.
- **`dev`** — PRs and `Required checks` required; force push and deletion
blocked. This is the normal contribution target.
blocked. This is the normal contribution target. The release-backmerge
workflow is the sole exception: its automation identity may compare-and-swap
`dev` to an exact checked merge commit after a stable hotfix release.
- **Merge policy** — merge commits allowed; squash and rebase merges disabled so
the no-ff contract cannot be bypassed in the GitHub UI.
- **Default branch** — `main`, which remains the release-history branch and the
@@ -523,10 +530,16 @@ the new app version and a higher `appVersionCode`.
run Android's retrace tool with the matching flavor mapping:
`retrace <mapping.txt> <obfuscated-trace.txt>`. Play reports can additionally
use the mapping bundled into the uploaded AAB through Play Console.
- `app/src/main/assets/whats_new.txt` — in-app "What's New" content
shown in the settings/about screen. Update with the version number
and a brief feature summary. Gets stale silently if forgotten
(v0.4.0 shipped with 0.1.0 content until caught post-release).
- `app/src/main/assets/changelog.json` — curated source for the in-app
**What's New** dialog and Android release history. Prepend the newest entry
with one explicit `highlight` (`title`, plain-language `summary`, and 1–3
user-benefit bullets), up to two quieter `improvements`, Android-only
`playNotes`, a `toastDigest` with counts and 0–2 short previews for noteworthy
items beyond the hero, and the existing technical `sections` used by older clients.
Do not derive the highlight mechanically from `CHANGELOG.md`; choosing the
release's main reason to care is an editorial release-prep decision.
- `app/src/main/assets/whats_new.txt` — legacy in-app fallback generated from
the newest structured entry. Do not edit it independently.
- `app/src/googlePlay/play/release-notes/en-US/default.txt` — the Play
Console **"What's new"** text, which gradle-play-publisher reads at
upload to fill the Production-draft release notes. This is **separate**
@@ -534,19 +547,60 @@ the new app version and a higher `appVersionCode`.
this file is missing or stale, the Play draft ships with empty/wrong
notes (shipped empty in v1.1.0 until caught post-release). Keep it
**≤500 chars per language**, user-facing, Android-only.
- `docs/play-store-listing.md` — Play Store listing copy. Update
the version reference and the "Release Notes" section that gets
pasted into the Play Console "What's new" field. Keep the Play
"What's new" within **500 characters** and framed around the
release's themes, not a feature dump. Compare its **Foreground service
- `docs/play-store-listing.md` — Play Store listing copy. Its release-note
block and the Gradle Play Publisher note are generated from `playNotes`.
After editing the newest structured entry, run
`python scripts/check-android-release-notes.py --write`, then run it again
without `--write` to validate the 1–3 / 0–2 editorial limits, current Android
version, GitHub-release/changelog headings, derived files, and Play's
**500-character** limit. Frame Play copy around the release's themes, not a
feature dump. Compare its **Foreground service
permissions** section with the merged `googlePlayRelease` manifest and
complete Play Console declarations for every declared service type before
approval; the Publisher API can upload a draft and still reject promotion
when an App content declaration is missing.
#### Generate release copy from the verified changes
When release copy is generated with an agent, this section is the canonical
authoring contract; do not maintain a separate prompt file.
1. Read the exact Android version/SHA, the Android-only entries selected from
`[Unreleased]`, the implemented behavior, and any compatibility or security
boundary that users must understand. Do not generate from commit titles or
a mixed-surface changelog block alone.
2. Before editing release files, show a temporary coverage ledger in the task
output. Map every selected source change to exactly one placement:
`hero`, `secondary`, or `full-only`. Include the change kind (`feature`,
`change`, or `fix`) and a short reason. The ledger is review evidence, not a
committed public artifact; no selected source item may disappear silently.
3. Choose exactly one `hero`: the strongest user-facing reason to care about
the release. Its summary is one plain-language outcome, and its 1–3 bullets
are distinct user benefits rather than implementation steps or filler.
4. Use `secondary` for other important user-visible features and fixes. The
`toastDigest` counts only these items, excluding the hero. Preview the
strongest 1–2 secondary items in short phrases. If there are no legitimate
secondary items, set both counts to `0` and `preview` to `[]`; the app hides
the footer. Never invent an item to satisfy the layout.
5. Use `full-only` for technically relevant details that belong in
`RELEASE_NOTES.md` or `CHANGELOG.md` but would make the collapsed update card
noisy. Preserve user-relevant trust and compatibility limits; omit branches,
worktrees, CI mechanics, debugging history, and private/operator context.
6. Write each surface for its audience:
- `RELEASE_NOTES.md`: concise Summary plus Added/Changed/Fixed; keep the
deterministic Download and Install/Verify scaffolding intact.
- `CHANGELOG.md`: complete, crisp public history for the released surface.
- `changelog.json`: curated hero, optional improvements, digest, Play copy,
and compatibility `sections` for older clients.
- `playNotes`: Android-only themes within the rendered 500-character limit.
7. Before presenting the draft, check that wording begins with user outcomes,
avoids unexplained implementation terminology, uses exact public product
names, makes no unverified device claim, and passes the public-distribution
scrub below.
#### Scrub for public distribution
This is a **public repo** and these four files are user-facing. Before
This is a **public repo** and these release-note files are user-facing. Before
promoting the `[Unreleased]` block and writing the notes, scrub the
versioned CHANGELOG block and all three release-notes artifacts for
wording that shouldn't ship publicly. The CHANGELOG accumulates in a
@@ -632,7 +686,9 @@ git checkout dev
git pull --ff-only origin dev
git add gradle/libs.versions.toml RELEASE_NOTES.md CHANGELOG.md \
app/src/main/assets/whats_new.txt docs/play-store-listing.md
app/src/main/assets/changelog.json app/src/main/assets/whats_new.txt \
app/src/googlePlay/play/release-notes/en-US/default.txt \
docs/play-store-listing.md
git commit -m "release(android): android-v0.6.2"
git push origin dev
@@ -922,8 +978,23 @@ When production has a bug, use the same invariant for every surface:
4. Open the focused hotfix PR into `main` and merge with a merge commit/no-ff.
5. Tag the new `main` tip with the affected surface's patch tag.
6. Verify the artifacts and production rollout or deployment.
7. Merge `main` back into `dev` immediately so integration inherits the fix and
version history.
7. Let the stable release workflow dispatch `Release Backmerge`. A
conflict-free candidate runs the same path-aware `Required checks` against
its exact SHA, then compare-and-swaps `dev` only if the base ref is unchanged.
Conflicts, failed checks, stale refs, or a denied update require a normal
reconciliation PR.
`Release Backmerge` accepts only published stable `android-v*`, `server-v*`, or
`desktop-v*` SemVer tags contained in `main`. It exits without mutation for a
normal release whose integration parent is already in `dev`. For a selective
hotfix, it pushes a temporary merge ref, dispatches `Required checks` with full
base/head SHAs, and updates `dev` with an explicit force-with-lease only after
that exact candidate passes. The lease is a compare-and-swap guard, not
permission to rewrite history: the candidate's first parent must be the
unchanged `dev` tip and its second parent the released commit. The repository
ruleset must allow this workflow's automation identity to perform that one
checked branch update; if it does not, the workflow fails closed and the
reconciliation uses a PR.
For an Android app hotfix:
@@ -938,21 +1009,21 @@ For an Android app hotfix:
6. `git tag android-v0.6.2` from the new `main` tip and `git push origin android-v0.6.2`
so Android release CI builds and publishes.
7. Verify the automated Play submission, GitHub artifacts, and rollout.
8. Merge `main` back into `dev` (`git checkout dev && git merge --no-ff main`)
so `dev` picks up the hotfix and the versionCode bump. Without this,
`dev`'s `appVersionCode` lags behind `main` and the next app release
bump collides.
8. Verify the automated release backmerge completed. If it stopped, open a
reconciliation PR so `dev` picks up the hotfix and versionCode bump. Without
reconciliation, `dev`'s `appVersionCode` lags behind `main` and the next app
release bump collides.
For a Plugin hotfix, branch from the affected `server-v*` tag, apply
the fix, run `bash scripts/bump-plugin-version.sh <next-version>`, merge to
`main`, tag `server-v<next-version>`, verify the package/deployment, and merge
`main` back to `dev`. Do not touch
`main`, tag `server-v<next-version>`, verify the package/deployment, and verify
the automated release backmerge. Do not touch
`gradle/libs.versions.toml` unless an Android app release is also shipping.
For a CLI+UI hotfix, branch from the affected `desktop-v*` tag, update only
`desktop/package.json` and its generated lock/runtime/tray metadata, merge to
`main`, tag `desktop-v<next-version>`, verify all binaries and the installer,
then merge `main` back to `dev`.
then verify the automated release backmerge or use the PR fallback.
## Troubleshooting
+10 -7
View File
@@ -1,10 +1,10 @@
# Hermes-Relay Android v1.13.1
# Hermes-Relay Android v1.13.2
**Release Date:** August 25, 2026
## Download
> Installing on your phone? Download `hermes-relay-1.13.1-sideload-release.apk` and tap it for the full feature set, or install the conservative build from [Google Play](https://play.google.com/store/apps/details?id=com.axiomlabs.hermesrelay).
> Installing on your phone? Download `hermes-relay-1.13.2-sideload-release.apk` and tap it for the full feature set, or install the conservative build from [Google Play](https://play.google.com/store/apps/details?id=com.axiomlabs.hermesrelay).
The `.aab` file is a Play Console upload bundle and cannot be installed by tapping it on a phone.
@@ -12,17 +12,20 @@ Verify the download against `SHA256SUMS.txt`. See the [sideload guide](https://h
## Summary
This patch makes Android session activity follow live Hermes runtime state instead of a five-minute recency estimate. It keeps Working, Starting, Needs input, Idle, Checking, Unavailable, and Background work accurate while preserving stale state until a complete, unambiguous snapshot can safely replace it.
This release adds a parent-configured Supervised Mode and improves its return from full settings. It also keeps session rows neutral until live activity is confirmed.
## Added
- Use a profile-pinned Supervised Mode with parent-controlled attachments, Standard voice, generated media, history, actions, and technical details. Device authentication protects full settings; this remains a client-side restricted view rather than a server-enforced account boundary.
## Fixed
- Derive session activity from the authoritative live runtime snapshot rather than Dashboard recency.
- Preserve prior activity when a refresh is incomplete, unsupported, or ambiguously scoped.
- Keep session drawer labels, timestamps, and active-turn ownership aligned with the exact profile and session.
- Keep session rows neutral while optional live activity is unavailable or still loading, and reserve full-row activity borders for actual Starting or Working turns.
- Keep Supervised Chat rendered when parent access relocks after visiting full settings.
## Install / Verify
- App version: **1.13.1** (versionCode **50**).
- App version: **1.13.2** (versionCode **51**).
- Standard Chat, sessions, Manage, sharing, profile switching, and Vanilla Hermes voice continue to work against unmodified upstream Hermes.
- Granular Device Control remains sideload-only; the Google Play build continues to ship Hermes Bridge Core without AccessibilityService Device Control.
- The optional Relay plugin remains unnecessary for standard Android chat, sessions, Manage, and Vanilla Hermes voice.
+5 -3
View File
@@ -756,8 +756,10 @@ cancels). Ranked next increments, in value-per-complexity order:
Plan: `docs/plans/2026-07-06-open-issue-resolution.md` (13 open issues triaged;
fix-state claims verified against tags with `git merge-base --is-ancestor`).
**Automation never posts to GitHub** — every comment/close/label below is an
owner action, deliberately queued here:
This historical batch remains owner-controlled. The bounded new-issue triage
lane may post one clearly identified first response and basic type/area labels,
but it does not execute backlog actions. Every comment, close, relabel, and
milestone below remains an owner action deliberately queued here:
- [ ] **#131** — close: fixed by `3573ba8` (PR #136), shipped android-v1.2.5
(reporter was on 1.2.3). Optionally re-check Play vitals for the
@@ -1452,5 +1454,5 @@ Follow-ups:
- **On-device import/delete smoke.** Import `/sdcard/Download/lucy.zip` via Add a pet → confirm Lucy appears, selects, and animates all states; then remove it and confirm the avatar falls back to the Sphere.
- **Pet behavior model — richer state association (spec'd 2026-06-19, `docs/pet-spec.md` "Agent states &amp; pet behavior").** Shipped: the honesty clamp (declared reactivity ∩ `PET_RENDERER_CAPABILITIES`), the friendly `writing` alias, the `**working`/tool-use overlay** (pet-local sub-state from `toolCallBurst`; opt-in `working` clip drives both the swap and the Tools badge), the **one-shot reaction layer** (`greet`/`wake` on appear, `done`/`celebrate` on turn-finish — opt-in, play-once-then-revert, transition-derived; `ONE_SHOT_MAX_MS` backstop), and `**intensity` modulation** (opt-in `reactive.intensity` → live playback speedup ≤1.6× via `rememberUpdatedState`; un-clamps the Activity badge). Voice · Tools · Activity reactivity is now complete. Remaining:
- `**attention` one-shot (only deferred behavior).** A reaction on notification arrival — needs a host event the avatar doesn't yet receive (unlike `greet`/`done`, which ride state transitions). Would plumb a notification edge into `AvatarRenderState` (or a side channel) + a `PetOneShot.Attention`. Low priority: the avatar is rarely on-screen when notifications land (backgrounded) — see the value analysis; revisit only if the avatar becomes an always-on surface (persistent overlay / Quest port).
- **On-device verification (working + one-shots + intensity).** Best seen in clean mode (`AgentTextFlow` feeds `toolCallBurst` + `streamingIntensity` + state transitions). Confirm: a `working` clip swaps in during a tool run and releases ~600ms after (`WORKING_BURST_THRESHOLD` 0.5); a `done` clip plays once on reply completion then returns to idle; a `greet` clip plays once when the avatar appears; with `intensity:true`, a writing/working loop visibly quickens while streaming. Confirm each decoded clip swap holds the previous complete visual until the new state is ready.
- **On-device verification (working + one-shots + intensity).** Use the normal Chat background visualization, which receives `toolCallBurst`, `streamingIntensity`, and state transitions. Confirm: a `working` clip swaps in during a tool run and releases ~600ms after (`WORKING_BURST_THRESHOLD` 0.5); a `done` clip plays once on reply completion then returns to idle; a `greet` clip plays once when the avatar appears; with `intensity:true`, a writing/working loop visibly quickens while streaming. Confirm each decoded clip swap holds the previous complete visual until the new state is ready.
- **Undecodable-but-present image appears valid (audit 2026-06-19).** A file that exists but isn't a decodable image passes the loader's `isFile` check, so the pet shows in the picker but renders blank. Documented as a caveat; consider a cheap header sniff at load time if false-valid pets become a support issue.
@@ -1 +1,3 @@
Session activity now follows live Hermes runtime state instead of a recent-activity estimate. Working, Starting, Needs input, Idle, Checking, Unavailable, and Background work stay accurate, and stale state clears only after a complete, unambiguous update.
v1.13.2 - Supervised Mode and clearer activity
Supervised Mode creates a simpler, profile-focused chat with device-protected parent settings and control over attachments, Standard voice, generated media, history, actions, and technical details. Activity indicators now appear only while Hermes is genuinely working, and returning from parent settings keeps Supervised Chat open.
@@ -1 +1 @@
会话活动现在依据 Hermes 的实时运行状态,而不是最近活动时间估算。工作中、启动中、需要输入、空闲、检查中、不可用和后台工作等状态会保持准确;只有完整且明确的更新才会清除旧状态。
新增监督模式:家长可配置并固定到指定配置文件,设置受设备身份验证保护。家长可限制附件、标准语音、生成媒体、历史记录、操作和技术详情。实时活动不可用时会话行保持中性显示,从家长设置返回时监督聊天也不再空白。
+43
View File
@@ -1,5 +1,48 @@
{
"schema": 2,
"versions": [
{
"version": "1.13.2",
"title": "Supervised Mode and clearer activity",
"date": "2026-08-25",
"highlight": {
"title": "Supervised Mode",
"summary": "Create a simpler, profile-focused chat and choose which features remain available.",
"bullets": [
"Protect parent settings with your phone's device authentication.",
"Choose access to attachments, Standard voice, generated media, history, actions, and technical details.",
"Keep Supervised Chat open when returning from parent settings."
]
},
"improvements": [
"Activity indicators now appear only while Hermes is genuinely working."
],
"toastDigest": {
"additionalFeatureCount": 0,
"fixCount": 2,
"preview": [
"Accurate activity",
"safer return"
]
},
"playNotes": "Supervised Mode creates a simpler, profile-focused chat with device-protected parent settings and control over attachments, Standard voice, generated media, history, actions, and technical details. Activity indicators now appear only while Hermes is genuinely working, and returning from parent settings keeps Supervised Chat open.",
"sections": [
{
"header": "Use a supervised chat",
"bullets": [
"Configure a profile-pinned restricted chat with parent-controlled attachments, voice, media, history, actions, and technical details.",
"Protect full settings with device authentication and keep Supervised Chat visible when parent access relocks."
]
},
{
"header": "Show only confirmed activity",
"bullets": [
"Keep session rows neutral while optional live activity is unavailable or still loading.",
"Show full-row activity borders only during actual Starting or Working turns."
]
}
]
},
{
"version": "1.13.1",
"title": "Accurate session activity",
+8 -4
View File
@@ -1,5 +1,9 @@
v1.13.1 - Accurate session activity
v1.13.2 - Supervised Mode and clearer activity
* Follow live Hermes runtime state for Working, Starting, Needs input, and Idle.
* Keep stale activity visible until a complete, unambiguous snapshot clears it.
* Distinguish Checking, Unavailable, and Background work in the session drawer.
Supervised Mode
* Protect parent settings with your phone's device authentication.
* Choose access to attachments, Standard voice, generated media, history, actions, and technical details.
* Keep Supervised Chat open when returning from parent settings.
Also improved
* Activity indicators now appear only while Hermes is genuinely working.
@@ -33,6 +33,8 @@ class ChatInputPreferencesRepository(
stringPreferencesKey("physical_keyboard_enter_behavior")
internal val KEY_CONVERT_LARGE_PASTES =
booleanPreferencesKey("convert_large_pastes_to_attachments")
internal val KEY_SHOW_GIT_WORKSPACE_IN_CHAT =
booleanPreferencesKey("show_git_workspace_in_chat")
}
val physicalKeyboardEnterBehavior: Flow<PhysicalKeyboardEnterBehavior> = dataStore.data
@@ -47,6 +49,10 @@ class ChatInputPreferencesRepository(
.map { preferences -> preferences[KEY_CONVERT_LARGE_PASTES] ?: true }
.distinctUntilChanged()
val showGitWorkspaceInChat: Flow<Boolean> = dataStore.data
.map { preferences -> preferences[KEY_SHOW_GIT_WORKSPACE_IN_CHAT] ?: true }
.distinctUntilChanged()
suspend fun setPhysicalKeyboardEnterBehavior(behavior: PhysicalKeyboardEnterBehavior) {
dataStore.edit { preferences ->
preferences[KEY_PHYSICAL_KEYBOARD_ENTER] = behavior.storedValue
@@ -58,4 +64,10 @@ class ChatInputPreferencesRepository(
preferences[KEY_CONVERT_LARGE_PASTES] = enabled
}
}
suspend fun setShowGitWorkspaceInChat(enabled: Boolean) {
dataStore.edit { preferences ->
preferences[KEY_SHOW_GIT_WORKSPACE_IN_CHAT] = enabled
}
}
}
@@ -28,11 +28,17 @@ data class GitStatusCounts(
val staged: Int = 0,
val modified: Int = 0,
val untracked: Int = 0,
/** Unique changed paths. -1 means an older plugin did not provide it. */
val changes: Int = -1,
val additions: Int = 0,
val deletions: Int = 0,
)
@Serializable
data class GitStatusEntry(
val path: String,
val additions: Int? = null,
val deletions: Int? = null,
)
/** A branch from /git/branches. */
@@ -90,10 +90,10 @@ data class SessionActivityRecord(
}
}
/** Presentation projection that never labels uncertain or background activity as Working. */
/** Presentation projection that never labels missing optional runtime data as session state. */
fun presentationState(nowMillis: Long = Long.MIN_VALUE): SessionActivityState? = when (freshness) {
SessionActivityFreshness.Revalidating -> SessionActivityState.Checking
SessionActivityFreshness.Unavailable -> SessionActivityState.Unavailable
SessionActivityFreshness.Revalidating -> null
SessionActivityFreshness.Unavailable -> null
SessionActivityFreshness.Confirmed -> when (phase(nowMillis)) {
SessionActivityPhase.Starting -> SessionActivityState.Starting
SessionActivityPhase.Working -> SessionActivityState.Working
@@ -294,7 +294,9 @@ data class SessionActivityRegistry(
private fun observeOwner(update: SessionActivityUpdate.ObserveOwner): SessionActivityRegistry {
val existing = records[update.owner]
if (existing?.freshness == SessionActivityFreshness.Confirmed) return this
// Directory rows establish ownership only. They are not live evidence and must not
// turn an unsupported/failed active-list probe back into a permanent Checking row.
if (existing != null) return this
val observed = SessionActivityRecord(
owner = update.owner,
turnPhase = SessionActivityPhase.Idle,
@@ -0,0 +1,55 @@
package com.hermesandroid.relay.ui
import com.hermesandroid.relay.data.GitRepo
import com.hermesandroid.relay.ui.components.ChatGitWorkspaceSummary
import com.hermesandroid.relay.viewmodel.GitRepoDetailState
internal fun selectGitRepoForWorkspace(
repos: List<GitRepo>,
selectedRepoId: String?,
sessionRepoRoot: String?,
sessionWorkingDirectory: String?,
): GitRepo? {
if (repos.isEmpty()) return null
fun normalized(path: String): String =
path.trim().replace('\\', '/').trimEnd('/')
val exactRoot = sessionRepoRoot?.let(::normalized).orEmpty()
val workingDirectory = sessionWorkingDirectory?.let(::normalized).orEmpty()
val matched = exactRoot.takeIf { it.isNotBlank() }?.let { root ->
repos.firstOrNull { normalized(it.root).equals(root, ignoreCase = true) }
} ?: workingDirectory.takeIf { it.isNotBlank() }?.let { cwd ->
repos.filter { repo ->
val root = normalized(repo.root)
cwd.equals(root, ignoreCase = true) ||
cwd.startsWith("$root/", ignoreCase = true)
}.maxByOrNull { normalized(it.root).length }
}
if (matched != null) return matched
if (repos.any { it.id == selectedRepoId }) return null
return repos.singleOrNull()
}
internal fun buildChatGitWorkspaceSummary(
repo: GitRepo?,
detail: GitRepoDetailState,
): ChatGitWorkspaceSummary? {
val ready = detail as? GitRepoDetailState.Ready ?: return null
repo ?: return null
val status = ready.status
val changedPaths = buildSet {
status.staged.forEach { add(it.path) }
status.modified.forEach { add(it.path) }
status.untracked.forEach { add(it.path) }
}
val branch = ready.branches.firstOrNull { it.isCurrent }?.name
?: repo.currentBranch.orEmpty()
if (branch.isBlank()) return null
return ChatGitWorkspaceSummary(
branch = branch,
changeCount = status.counts.changes.takeIf { it >= 0 } ?: changedPaths.size,
additions = status.counts.additions,
deletions = status.counts.deletions,
)
}
@@ -39,6 +39,7 @@ import androidx.compose.material3.SnackbarDuration
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.SnackbarResult
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
@@ -67,6 +68,8 @@ import androidx.compose.ui.platform.LocalWindowInfo
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import androidx.lifecycle.createSavedStateHandle
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.NavGraph.Companion.findStartDestination
@@ -126,6 +129,7 @@ import com.hermesandroid.relay.ui.components.HostResourcePressureBanner
import com.hermesandroid.relay.ui.components.rememberUpdateAvailability
import com.hermesandroid.relay.ui.components.resolveChatTransportStatus
import com.hermesandroid.relay.ui.components.WhatsNewDialog
import com.hermesandroid.relay.ui.components.WhatsNewToast
import com.hermesandroid.relay.data.AgentDisplay
import com.hermesandroid.relay.data.BridgePreferencesRepository
import com.hermesandroid.relay.data.BridgeSafetyPreferencesRepository
@@ -164,6 +168,7 @@ import com.hermesandroid.relay.ui.screens.BotModeScreen
// === END PHASE3-safety-rails ===
import com.hermesandroid.relay.ui.screens.ChatScreen
import com.hermesandroid.relay.ui.screens.ChatSettingsScreen
import com.hermesandroid.relay.ui.screens.ChangelogScreen
import com.hermesandroid.relay.ui.screens.DashboardManagementScreen
import com.hermesandroid.relay.ui.screens.DashboardSignInScreen
import com.hermesandroid.relay.ui.screens.DeveloperSettingsScreen
@@ -181,6 +186,7 @@ import com.hermesandroid.relay.ui.screens.PluginsScreen
import com.hermesandroid.relay.ui.screens.PluginPageScreen
import com.hermesandroid.relay.ui.screens.GitStateScreen
import com.hermesandroid.relay.viewmodel.GitStateViewModel
import com.hermesandroid.relay.viewmodel.GitStateUiState
import com.hermesandroid.relay.ui.screens.TerminalScreen
import com.hermesandroid.relay.ui.screens.NotificationCompanionSettingsScreen
import com.hermesandroid.relay.ui.screens.ProactiveSettingsScreen
@@ -898,11 +904,75 @@ fun RelayApp() {
gitStateViewModel.setWriteGrant(gitOwnerKey, granted)
}
// What's New auto-show
val showWhatsNew by connectionViewModel.showWhatsNew.collectAsState()
val gitReposState by gitStateViewModel.repos.collectAsState()
val gitDetailState by gitStateViewModel.detail.collectAsState()
val selectedGitRepoId by gitStateViewModel.selectedRepoId.collectAsState()
val chatSessions by chatViewModel.sessions.collectAsState()
val activeChatSession = remember(chatSessions, currentChatSessionId) {
chatSessions.firstOrNull { it.sessionId == currentChatSessionId }
}
if (showWhatsNew) {
WhatsNewDialog(onDismiss = { connectionViewModel.dismissWhatsNew() })
// Bind Git to the active coding session when upstream supplies its exact
// workspace metadata. CWD fallback only matches a path-segment descendant;
// an ambiguous multi-repo catalog stays unselected until the user chooses.
LaunchedEffect(gitReposState, activeChatSession, selectedGitRepoId) {
val repos = (gitReposState as? GitStateUiState.Ready)?.repos.orEmpty()
val target = selectGitRepoForWorkspace(
repos = repos,
selectedRepoId = selectedGitRepoId,
sessionRepoRoot = activeChatSession?.gitRepoRoot,
sessionWorkingDirectory = activeChatSession?.workingDirectory,
)
if (target != null && target.id != selectedGitRepoId) {
gitStateViewModel.selectRepo(target.id)
}
}
val gitWorkspaceAvailable = gitReposState is GitStateUiState.Ready
val gitWorkspaceSummary = remember(
gitReposState,
gitDetailState,
selectedGitRepoId,
) {
val repo = (gitReposState as? GitStateUiState.Ready)
?.repos
?.firstOrNull { it.id == selectedGitRepoId }
buildChatGitWorkspaceSummary(repo, gitDetailState)
}
// Post-update What's New starts as a non-blocking toast and expands only
// when requested; manual Settings/About entry points retain the full view.
val showWhatsNew by connectionViewModel.showWhatsNew.collectAsState()
var showWhatsNewExpanded by rememberSaveable { mutableStateOf(false) }
var showWhatsNewHistory by rememberSaveable { mutableStateOf(false) }
if (showWhatsNew && !showWhatsNewExpanded) {
WhatsNewToast(
onDismiss = { connectionViewModel.dismissWhatsNew() },
onExpand = {
connectionViewModel.dismissWhatsNew()
showWhatsNewExpanded = true
},
)
}
if (showWhatsNewExpanded) {
WhatsNewDialog(
onDismiss = { showWhatsNewExpanded = false },
onViewHistory = {
showWhatsNewExpanded = false
showWhatsNewHistory = true
},
)
}
if (showWhatsNewHistory) {
Dialog(
onDismissRequest = { showWhatsNewHistory = false },
properties = DialogProperties(usePlatformDefaultWidth = false),
) {
Surface(modifier = Modifier.fillMaxSize()) {
ChangelogScreen(onClose = { showWhatsNewHistory = false })
}
}
}
// Mark version as seen on first launch (when there's no previous version)
@@ -2295,6 +2365,11 @@ fun RelayApp() {
onNavigateToBotMode = {
navController.navigate(Screen.BotMode.route) { launchSingleTop = true }
},
gitWorkspaceAvailable = gitWorkspaceAvailable,
gitWorkspaceSummary = gitWorkspaceSummary,
onNavigateToGitWorkspace = {
navController.navigate(Screen.GitState.route) { launchSingleTop = true }
},
)
}
composable(Screen.BotMode.route) {
@@ -2650,6 +2725,9 @@ fun RelayApp() {
onNavigateToPlugins = {
navController.navigate(Screen.Plugins.route)
},
onNavigateToGitWorkspace = {
navController.navigate(Screen.GitState.route)
},
onNavigateToChatSettings = {
navController.navigate(Screen.ChatSettings.route)
},
@@ -0,0 +1,53 @@
package com.hermesandroid.relay.ui.components
import android.content.Context
import android.provider.Settings
import android.view.accessibility.AccessibilityManager
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalContext
/** Shared OS motion/accessibility posture for animated UI affordances. */
internal data class AccessibleMotionState(
/** OS animator scale is non-zero (i.e. system animations are on). */
val osAnimations: Boolean,
/** TalkBack-style touch exploration is active. */
val touchExploration: Boolean,
)
@Composable
internal fun rememberAccessibleMotionState(): AccessibleMotionState {
val context = LocalContext.current
val osAnimations = remember {
runCatching {
Settings.Global.getFloat(
context.contentResolver,
Settings.Global.ANIMATOR_DURATION_SCALE,
1f,
) != 0f
}.getOrDefault(true)
}
val accessibilityManager = remember {
context.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager
}
var touchExploration by remember {
mutableStateOf(accessibilityManager?.isTouchExplorationEnabled == true)
}
DisposableEffect(accessibilityManager) {
val listener = AccessibilityManager.TouchExplorationStateChangeListener { enabled ->
touchExploration = enabled
}
accessibilityManager?.addTouchExplorationStateChangeListener(listener)
onDispose {
accessibilityManager?.removeTouchExplorationStateChangeListener(listener)
}
}
return AccessibleMotionState(
osAnimations = osAnimations,
touchExploration = touchExploration,
)
}
@@ -1,665 +0,0 @@
package com.hermesandroid.relay.ui.components
import android.content.Context
import android.provider.Settings
import android.view.accessibility.AccessibilityManager
import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.foundation.background
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.Send
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.graphics.BlendMode
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.CompositingStrategy
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.semantics.LiveRegionMode
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.liveRegion
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.res.stringResource
import com.hermesandroid.relay.data.ChatMessage
import com.hermesandroid.relay.data.MessageRole
import com.hermesandroid.relay.ui.components.avatar.AvatarRenderState
import com.hermesandroid.relay.ui.components.avatar.LocalAgentAvatar
import com.hermesandroid.relay.ui.components.avatar.LocalBackgroundVisualizationEnabled
import kotlinx.coroutines.delay
import com.hermesandroid.relay.R
import com.hermesandroid.relay.ui.theme.RelayRefresh
// --- Text-flow tuning constants -------------------------------------------
//
// All time-based numbers stay inside the ranges WP-C1 prescribes so the
// "clean text flowing in and fading out" reads calm rather than frantic.
/** Soft word-wrap width for a flow line — keeps each buffer entry to ~one
* visual line so the bounded buffer maps cleanly to "≤6 lines". */
private const val FLOW_MAX_CHARS = 42
/** Soft-wrap target only — the visible buffer is now bounded by the
* scrollable viewport height + scroll, not a hard line count. */
private const val FLOW_MAX_LINES = 6
/** Memory ceiling for the persistent line buffer. Lines past this (already
* scrolled well above the faded top edge) are dropped silently so a very long
* turn can't grow the list without bound. */
private const val FLOW_BUFFER_MAX = 80
/** How long a settled line lingers after it stops growing, before it begins
* fading. Inside the 2.5–4s band from the spec. */
private const val FLOW_DWELL_MS = 3_000L
private const val FLOW_FADE_IN_MS = 180
private const val FLOW_FADE_OUT_MS = 600
/** Buffer maintenance cadence. Cheap list bookkeeping only — it mutates
* observed state (and so triggers recomposition) only when something
* actually changes, so an idle clean mode does not churn the UI. */
private const val FLOW_TICK_MS = 80L
/**
* One ephemeral line in the text flow.
*
* [text] and [visibility] are snapshot-observed so a growing tail or a
* fade-out re-renders just that line. [settledAt]/[hiddenAt] are plain
* bookkeeping read only by the maintenance loop, so they intentionally do
* NOT trigger recomposition.
*
* [visibility] starts `currentState = false, targetState = true`; handing
* that to `AnimatedVisibility(visibleState = …)` plays the enter transition
* the first time the line is composed — the idiomatic "animate on appear".
*/
private class FlowLine(val key: Int, initialText: String) {
var text by mutableStateOf(initialText)
val visibility = MutableTransitionState(false).apply { targetState = true }
/** Wall-clock millis at which the line stopped growing (null while it is
* still the active streaming tail). Starts the dwell countdown. */
var settledAt: Long? = null
/** Wall-clock millis at which the fade-out was requested. */
var hiddenAt: Long? = null
}
/**
* Split [text] into short, append-only flow segments.
*
* Explicit newlines hard-break; long paragraphs greedily soft-wrap at word
* boundaries to [maxChars]. Because the source content only ever grows
* (streaming appends), every segment except the last is final the moment the
* next word/line exists — which is exactly what lets the caller treat the
* last segment as the "growing tail" and everything before it as settled,
* and key each line by its stable index.
*/
private fun segmentFlowLines(text: String, maxChars: Int): List<String> {
if (text.isBlank()) return emptyList()
val out = ArrayList<String>()
for (rawLine in text.split('\n')) {
val line = rawLine.trim()
if (line.isEmpty()) continue
val current = StringBuilder()
for (word in line.split(' ')) {
if (word.isEmpty()) continue
val candidate = if (current.isEmpty()) word.length else current.length + 1 + word.length
if (candidate > maxChars && current.isNotEmpty()) {
out.add(current.toString())
current.setLength(0)
current.append(word)
} else {
if (current.isNotEmpty()) current.append(' ')
current.append(word)
}
}
if (current.isNotEmpty()) out.add(current.toString())
}
return out
}
/**
* Soft fade on the TOP edge so lines that scroll up dissolve cleanly into the
* background instead of hard-clipping — the "slides up and clears" look — while
* the avatar above stays unobstructed. Renders the content into an offscreen
* layer and masks the top [fade] dp with a transparent->opaque gradient.
*/
private fun Modifier.topFadeEdge(fade: Dp = 28.dp): Modifier = this
.graphicsLayer { compositingStrategy = CompositingStrategy.Offscreen }
.drawWithContent {
drawContent()
val fadePx = fade.toPx().coerceAtMost(size.height)
if (fadePx <= 0f) return@drawWithContent
drawRect(
brush = Brush.verticalGradient(
0f to Color.Transparent,
(fadePx / size.height) to Color.Black,
),
blendMode = BlendMode.DstIn,
)
}
/** Shared OS motion/accessibility posture for animated chat affordances. */
internal data class AccessibleMotionState(
/** OS animator scale is non-zero (i.e. system animations are ON). */
val osAnimations: Boolean,
/** TalkBack-style touch exploration is active — faded text is unreadable
* to it, so the text path must fall back to a static, announced mirror. */
val touchExploration: Boolean,
)
@Composable
internal fun rememberAccessibleMotionState(): AccessibleMotionState {
val context = LocalContext.current
// ANIMATOR_DURATION_SCALE == 0 is the platform "remove animations" / many
// OEM "reduce motion" toggles. Read once on entry; a mid-mode toggle is
// rare and recovered by leaving + re-entering the mode.
val osAnimations = remember {
runCatching {
Settings.Global.getFloat(
context.contentResolver,
Settings.Global.ANIMATOR_DURATION_SCALE,
1f,
) != 0f
}.getOrDefault(true)
}
val a11y = remember {
context.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager
}
var touchExploration by remember {
mutableStateOf(a11y?.isTouchExplorationEnabled == true)
}
DisposableEffect(a11y) {
val listener = AccessibilityManager.TouchExplorationStateChangeListener { enabled ->
touchExploration = enabled
}
a11y?.addTouchExplorationStateChangeListener(listener)
onDispose { a11y?.removeTouchExplorationStateChangeListener(listener) }
}
return AccessibleMotionState(
osAnimations = osAnimations,
touchExploration = touchExploration,
)
}
/**
* Ephemeral, themed text flow bound to the agent's streaming reply.
*
* New segments materialize with `fadeIn + slideInVertically`; a settled line
* dwells ~[FLOW_DWELL_MS], then `fadeOut`s and is **removed from the buffer**
* (it leaves the composition tree, so it stops composing — not merely
* alpha-0). The still-growing tail never fades; its dwell starts only once
* [streaming] flips false. The buffer is hard-capped at [FLOW_MAX_LINES].
*
* Accessibility: when [motionEnabled] is false (animations disabled, OS
* reduce-motion, or TalkBack touch exploration) the flow renders the recent
* lines **statically** inside a polite live region — never gating the
* conversation on animation. Even on the animated path a visually-hidden
* polite mirror carries the readable words, since faded glyphs are
* unreadable to assistive tech.
*
* @param content the last assistant message's (streaming) content.
* @param streaming whether that message is still growing this turn.
* @param messageId stable id of the bound message; a new id resets the buffer.
*/
@Composable
fun AgentTextFlow(
content: String,
streaming: Boolean,
messageId: String?,
motionEnabled: Boolean,
modifier: Modifier = Modifier,
) {
val flowStyle = MaterialTheme.typography.bodyMedium.copy(
fontFamily = FontFamily.Monospace,
fontSize = 15.sp,
lineHeight = 21.sp,
)
val flowColor = MaterialTheme.colorScheme.onSurface
// Readable, non-faded mirror of the visible tail — used as the live-region
// text on both paths so assistive tech hears the words.
val mirrorText = remember(content) {
segmentFlowLines(content, FLOW_MAX_CHARS).takeLast(FLOW_MAX_LINES).joinToString(" ")
}
// --- Static / reduced-motion path -------------------------------------
if (!motionEnabled) {
val staticLines = remember(content) {
segmentFlowLines(content, FLOW_MAX_CHARS).takeLast(FLOW_BUFFER_MAX)
}
val staticScroll = rememberScrollState()
// Pin the latest line to the bottom of the bounded viewport.
LaunchedEffect(staticLines.size) { staticScroll.scrollTo(staticScroll.maxValue) }
// No contentDescription — the merged child Text content IS the readable
// content; liveRegion announces it on change. Lines persist + scroll
// (bounded + top-faded like the animated path) — they never vanish.
Column(
modifier = modifier
.semantics { liveRegion = LiveRegionMode.Polite }
// Fade the top edge ONLY when there's content scrolled above it —
// a message that fits shows its first line crisply (no cut-off look).
.topFadeEdge(fade = if (staticScroll.canScrollBackward) 28.dp else 0.dp)
.verticalScroll(staticScroll),
verticalArrangement = Arrangement.Bottom,
) {
staticLines.forEach { line ->
Text(
text = line,
style = flowStyle,
color = flowColor,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.fillMaxWidth(),
)
}
}
return
}
// --- Animated path ----------------------------------------------------
val flowLines = remember(messageId) { mutableStateListOf<FlowLine>() }
val currentContent by rememberUpdatedState(content)
LaunchedEffect(messageId) {
flowLines.clear()
// Largest segment index ever materialized — guards against re-adding a
// line that was dropped from the front by the memory cap.
var maxKeyAdded = -1
var lastText: String? = null
while (true) {
val text = currentContent
// Re-diff only when the transcript changed, so an idle clean mode
// (no streaming, no new turn) doesn't churn. We never permanently
// exit: a new turn appended to the transcript must still slide in.
if (text != lastText) {
lastText = text
val segs = segmentFlowLines(text, FLOW_MAX_CHARS)
// Add new lines (they slide in); update a changed tail in place.
// Lines PERSIST — older ones simply scroll up within the bounded,
// scrollable viewport and dissolve at the top fade edge.
segs.forEachIndexed { i, s ->
val existing = flowLines.firstOrNull { it.key == i }
if (existing == null) {
if (i > maxKeyAdded) {
flowLines.add(FlowLine(key = i, initialText = s))
maxKeyAdded = i
}
} else if (existing.text != s) {
existing.text = s
}
}
// Memory guard: drop the oldest lines once well past the viewport.
while (flowLines.size > FLOW_BUFFER_MAX) flowLines.removeAt(0)
}
delay(FLOW_TICK_MS)
}
}
val scrollState = rememberScrollState()
// Pin the latest line to the bottom as content streams in / lines slide up.
LaunchedEffect(flowLines.size, flowLines.lastOrNull()?.text) {
scrollState.scrollTo(scrollState.maxValue)
}
Box(modifier = modifier) {
// Visually-hidden, readable, politely-announced mirror. Present even
// with motion on, so non-touch assistive tech still receives the words
// the faded glyphs can't convey. The Text's own content is its
// semantics text, so liveRegion alone announces it on change.
Text(
text = mirrorText,
maxLines = 1,
modifier = Modifier
.fillMaxWidth()
.heightIn(max = 1.dp)
.alpha(0f)
.semantics { liveRegion = LiveRegionMode.Polite },
style = flowStyle,
)
Column(
modifier = Modifier
.align(Alignment.BottomStart)
.fillMaxWidth()
// Fade the top edge ONLY when content is scrolled above it, so a
// reply that fits the viewport shows its first line crisply.
.topFadeEdge(fade = if (scrollState.canScrollBackward) 28.dp else 0.dp)
.verticalScroll(scrollState),
verticalArrangement = Arrangement.Bottom,
) {
flowLines.forEach { line ->
androidx.compose.runtime.key(line.key) {
AnimatedVisibility(
visibleState = line.visibility,
enter = fadeIn(tween(FLOW_FADE_IN_MS)) +
slideInVertically(tween(FLOW_FADE_IN_MS)) { it / 6 },
exit = fadeOut(tween(FLOW_FADE_OUT_MS)),
) {
Text(
text = line.text,
style = flowStyle,
color = flowColor,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
// The visible glyphs fade; the mirror above owns
// accessibility, so keep AT off these duplicates.
modifier = Modifier
.fillMaxWidth()
.clearAndSetSemantics {},
)
}
}
}
}
}
}
/**
* Thin single-line composer for clean mode.
*
* Deliberately stripped: no model/effort pills, no attachments, no slash
* palette — just a pill field plus a send affordance, calling [onSend] with
* the same [com.hermesandroid.relay.viewmodel.ChatViewModel.sendMessage]
* contract the full composer uses. Internal text state is UI-local.
*/
@Composable
private fun CleanModeComposer(
enabled: Boolean,
onSend: (String) -> Unit,
modifier: Modifier = Modifier,
) {
var text by remember { mutableStateOf("") }
val canSend = enabled && text.isNotBlank()
val submit = {
val trimmed = text.trim()
if (enabled && trimmed.isNotEmpty()) {
onSend(trimmed)
text = ""
}
}
Surface(
shape = RoundedCornerShape(28.dp),
color = MaterialTheme.colorScheme.surfaceContainerHigh,
modifier = modifier.fillMaxWidth(),
) {
Row(
modifier = Modifier.padding(start = 18.dp, end = 6.dp, top = 4.dp, bottom = 4.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(6.dp),
) {
BasicTextField(
value = text,
onValueChange = { text = it },
modifier = Modifier
.weight(1f)
.heightIn(min = 40.dp)
.padding(vertical = 8.dp),
enabled = enabled,
singleLine = true,
textStyle = MaterialTheme.typography.bodyLarge.copy(
color = MaterialTheme.colorScheme.onSurface,
),
cursorBrush = SolidColor(MaterialTheme.colorScheme.primary),
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Send),
keyboardActions = KeyboardActions(onSend = { submit() }),
decorationBox = { inner ->
Box(contentAlignment = Alignment.CenterStart) {
if (text.isEmpty()) {
Text(
text = stringResource(R.string.agent_text_placeholder),
style = MaterialTheme.typography.bodyLarge,
color = RelayRefresh.Dim,
)
}
inner()
}
},
)
IconButton(
onClick = submit,
enabled = canSend,
modifier = Modifier.size(44.dp),
) {
Icon(
imageVector = Icons.AutoMirrored.Filled.Send,
contentDescription = stringResource(R.string.agent_text_send_cd),
tint = if (canSend) {
MaterialTheme.colorScheme.primary
} else {
MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.5f)
},
)
}
}
}
}
/**
* Clean text-flow chat mode — a full-screen, minimalist third presentation of
* the agent surface (alongside normal chat and the voice overlay).
*
* Centered morphing sphere, a calm themed text flow ([AgentTextFlow]) instead
* of a persistent transcript, and a thin composer. Mirrors the voice overlay's
* centered-sphere + bottom-content skeleton (`VoiceModeOverlay.kt:262-280`).
*
* Exit is an **explicit control** (top-corner dismiss + system back) — never
* any-tap, because the in-mode composer needs taps. All mode state lives in
* the caller as plain UI-local state; this is a presentation over the same
* conversation, not new ViewModel state.
*
* Honors the ambient-visualization preference independently from motion.
* When visible, [animationEnabled] and OS reduce-motion pause the sphere on a
* static frame; TalkBack keeps the text readable and announced.
*/
@Composable
fun CleanChatMode(
messages: List<ChatMessage>,
isStreaming: Boolean,
sphereState: SphereState,
streamingIntensity: Float,
toolCallBurst: Float,
animationEnabled: Boolean,
enabled: Boolean,
onSend: (String) -> Unit,
onExit: () -> Unit,
modifier: Modifier = Modifier,
) {
val motion = rememberAccessibleMotionState()
val backgroundVisualizationEnabled = LocalBackgroundVisualizationEnabled.current
val sphereAnimated = animationEnabled && motion.osAnimations
// Faded text is unreadable to touch exploration, so the text path goes
// static (readable + announced) whenever TalkBack is exploring.
val textMotionEnabled = sphereAnimated && !motion.touchExploration
val lastAssistant = remember(messages) {
messages.lastOrNull { it.role == MessageRole.ASSISTANT }
}
// Clean mode shows the recent CONVERSATION (not just the last reply) as one
// faded, scrollable flow, so scrolling up brings history into view. The flow
// is append-only across turns; user turns get a subtle "›" so the
// back-and-forth stays legible. How far back it retains is bounded by the
// flow's line buffer (FLOW_BUFFER_MAX).
val flowContent = remember(messages) {
messages
.filter { it.role == MessageRole.USER || it.role == MessageRole.ASSISTANT }
.joinToString("\n\n") { msg ->
val body = msg.content.trim()
if (msg.role == MessageRole.USER) "› $body" else body
}
}
// Stable per-conversation key so the flow buffer accumulates across turns and
// resets only on a new conversation (the oldest message's id changes).
val conversationKey = messages.firstOrNull()?.id
val flowStreaming = lastAssistant?.isStreaming == true && isStreaming
// The sphere + text are a vertically-centered group (equal spacers above and
// below). The sphere is a fixed size so the group grows via the TEXT: a short
// reply sits centered, and as the reply lengthens the centered group gets
// taller — sliding the sphere up toward the top third while the text fills
// down toward the composer.
val sphereHeight = (LocalConfiguration.current.screenHeightDp * 0.34f).dp
val maxFlowHeight = (LocalConfiguration.current.screenHeightDp * 0.5f).dp
BackHandler(enabled = true) { onExit() }
val sphereDescLabel = stringResource(R.string.agent_text_sphere_desc)
val sphereDescription = remember(sphereState) {
"$sphereDescLabel ${sphereState.name.lowercase()}"
}
Box(
modifier = modifier
.fillMaxSize()
// Opaque so the chat underneath is fully hidden — this is a mode,
// not a translucent overlay.
.background(RelayRefresh.Background)
// Consume any pointer event the children (composer, exit button, text
// scroll) didn't handle, so stray taps/swipes in the empty areas don't
// fall through to the chat + session drawer behind this mode. Children
// run leaf-first on the same Main pass, so this only catches the gaps
// (mirrors the voice overlay's focus-mode scrim).
.pointerInput(Unit) {
awaitPointerEventScope {
while (true) {
awaitPointerEvent().changes.forEach { it.consume() }
}
}
},
) {
Column(
modifier = Modifier
.fillMaxSize()
.statusBarsPadding()
.navigationBarsPadding()
.imePadding()
.padding(horizontal = 20.dp),
) {
// Explicit dismiss — the only way out besides system back.
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.End,
) {
IconButton(onClick = onExit) {
Icon(
imageVector = Icons.Filled.Close,
contentDescription = stringResource(R.string.agent_text_exit_clean),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
}
// Flexible top spacer — with the bottom one it vertically centers the
// sphere + text group; as the text grows the spacers yield and the
// sphere rises toward the top third.
Spacer(modifier = Modifier.weight(1f))
// The ambient sphere is optional. Hiding it collapses the visual's
// slot so the conversation remains centered instead of leaving a
// large blank region above the text.
if (backgroundVisualizationEnabled) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(sphereHeight),
contentAlignment = Alignment.Center,
) {
Box(
modifier = Modifier
.fillMaxSize()
.semantics { contentDescription = sphereDescription },
) {
LocalAgentAvatar.current.Render(
state = AvatarRenderState(
state = sphereState,
intensity = streamingIntensity,
toolCallBurst = toolCallBurst,
// Pin to a still frame when motion is suppressed.
paused = !sphereAnimated,
),
modifier = Modifier.fillMaxSize(),
)
}
}
}
AgentTextFlow(
content = flowContent,
streaming = flowStreaming,
messageId = conversationKey,
motionEnabled = textMotionEnabled,
// Content-sized reading area (capped ~half the screen) directly
// below the sphere — no gap between them. Grows + scrolls with the
// reply, which is what lifts the centered group (and the sphere).
modifier = Modifier
.fillMaxWidth()
.widthIn(max = 560.dp)
.heightIn(min = 96.dp, max = maxFlowHeight)
.padding(bottom = 12.dp),
)
// Flexible bottom spacer — balances the top one to keep the
// sphere + text group vertically centered.
Spacer(modifier = Modifier.weight(1f))
CleanModeComposer(
enabled = enabled,
onSend = onSend,
modifier = Modifier.padding(bottom = 12.dp),
)
}
}
}
@@ -0,0 +1,156 @@
package com.hermesandroid.relay.ui.components
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
import androidx.compose.material.icons.filled.AccountTree
import androidx.compose.material3.Icon
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource
import com.hermesandroid.relay.R
import com.hermesandroid.relay.ui.theme.RelayRefresh
import com.hermesandroid.relay.ui.theme.appearanceRoundedCornerShape
import com.hermesandroid.relay.ui.theme.relayMetadataStyle
/** Small, read-only Git projection supplied by the native workspace owner. */
data class ChatGitWorkspaceSummary(
val branch: String,
val changeCount: Int,
val additions: Int? = null,
val deletions: Int? = null,
)
@Composable
fun ChatGitContextButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
Box(modifier = modifier) {
RelayChromeIconButton(
icon = Icons.Filled.AccountTree,
contentDescription = stringResource(R.string.chat_git_open_workspace),
onClick = onClick,
)
Surface(
modifier = Modifier
.size(9.dp)
.align(Alignment.TopEnd),
shape = CircleShape,
color = RelayRefresh.Green,
border = BorderStroke(1.5.dp, RelayRefresh.Background),
content = {},
)
}
}
@Composable
fun ChatGitWorkspaceRail(
summary: ChatGitWorkspaceSummary,
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
val branch = summary.branch.trim()
val changeCount = summary.changeCount.coerceAtLeast(0)
val changeLabel = pluralStringResource(
R.plurals.chat_git_change_count,
changeCount,
changeCount,
)
val additions = summary.additions?.coerceAtLeast(0)
val deletions = summary.deletions?.coerceAtLeast(0)
val a11yLabel = buildList {
add(stringResource(R.string.chat_git_branch, branch))
add(changeLabel)
additions?.let { add(stringResource(R.string.chat_git_additions, it)) }
deletions?.let { add(stringResource(R.string.chat_git_deletions, it)) }
add(stringResource(R.string.chat_git_open_workspace))
}.joinToString(". ")
Surface(
onClick = onClick,
modifier = modifier
.fillMaxWidth()
.height(38.dp)
.clearAndSetSemantics { contentDescription = a11yLabel },
shape = appearanceRoundedCornerShape(12.dp),
color = RelayRefresh.Background.copy(alpha = 0.72f),
border = BorderStroke(1.dp, RelayRefresh.LineStrong),
) {
Row(
modifier = Modifier.padding(horizontal = 11.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Icon(
imageVector = Icons.Filled.AccountTree,
contentDescription = null,
tint = RelayRefresh.Cyan,
modifier = Modifier.size(17.dp),
)
Text(
text = branch,
style = relayMetadataStyle(),
color = RelayRefresh.Paper,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.widthIn(max = 92.dp),
)
Box(
modifier = Modifier
.width(1.dp)
.height(16.dp)
.background(RelayRefresh.LineStrong),
)
Text(
text = changeLabel,
style = relayMetadataStyle(),
color = RelayRefresh.Muted,
maxLines = 1,
)
Spacer(modifier = Modifier.weight(1f))
additions?.let {
Text(
text = "+$it",
style = relayMetadataStyle(),
color = RelayRefresh.Green,
maxLines = 1,
)
}
deletions?.let {
Text(
text = "-$it",
style = relayMetadataStyle(),
color = RelayRefresh.Danger,
maxLines = 1,
)
}
Icon(
imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight,
contentDescription = null,
tint = RelayRefresh.Muted,
modifier = Modifier.size(18.dp),
)
}
}
}
@@ -14,7 +14,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.withFrameNanos
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clipToBounds
import androidx.compose.ui.geometry.Offset
@@ -26,8 +25,6 @@ import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.hermesandroid.relay.ui.theme.LocalBrand
import kotlinx.coroutines.delay
import kotlin.math.sin
/**
* ASCII morphing sphere — the visual embodiment of the AI agent.
@@ -56,19 +53,13 @@ import kotlin.math.sin
private const val SPHERE_TIME_UNITS_PER_SEC = 1f
private const val SPHERE_TWO_PI = 6.2832f
private const val SPHERE_COLOR_RADIANS_PER_SEC = 0.7854f
private const val SPHERE_IDLE_BREATH_RADIANS_PER_SEC = 0.72f
private const val SPHERE_IDLE_BREATH_SCALE = 0.012f
private const val SPHERE_IDLE_LAYER_FRAME_INTERVAL_MS = 184L
internal enum class SphereMotionMode {
Still,
AmbientLayer,
Procedural,
}
internal fun sphereMotionMode(
state: SphereState,
voiceMode: Boolean,
motionVisible: Boolean,
fixedTime: Float?,
fixedColorPhase: Float?,
@@ -76,11 +67,7 @@ internal fun sphereMotionMode(
if (!motionVisible || fixedTime != null || fixedColorPhase != null) {
return SphereMotionMode.Still
}
return if (state == SphereState.Idle && !voiceMode) {
SphereMotionMode.AmbientLayer
} else {
SphereMotionMode.Procedural
}
return SphereMotionMode.Procedural
}
@Composable
@@ -134,15 +121,12 @@ fun MorphingSphere(
val cg2 by animateFloatAsState(targetC.g2, spec, label = "cg2")
val cb2 by animateFloatAsState(targetC.b2, spec, label = "cb2")
// Active states retain the full procedural animation. Visible Idle uses a
// lightweight graphics-layer breath: redrawing the 58x34 glyph grid just
// for ambient drift was the measured screen-on hotspot, while transforming
// its cached layer preserves the intended living Sphere at far lower cost.
// Every visible Sphere uses the same display-synced procedural loop so
// startup, chat, and voice all feel equally smooth. Backgrounded and
// explicitly paused/reduced-motion renderers still pin a static frame.
val animatedTime = remember { mutableFloatStateOf(0f) }
val animatedColorPhase = remember { mutableFloatStateOf(0f) }
val motionMode = sphereMotionMode(
state = state,
voiceMode = effVoiceMode,
motionVisible = motionVisible,
fixedTime = fixedTime,
fixedColorPhase = fixedColorPhase,
@@ -162,25 +146,6 @@ fun MorphingSphere(
}
}
}
val idleBreathPhase = remember { mutableFloatStateOf(0f) }
LaunchedEffect(motionMode) {
if (motionMode != SphereMotionMode.AmbientLayer) {
idleBreathPhase.floatValue = 0f
return@LaunchedEffect
}
var lastNanos = withFrameNanos { it }
while (true) {
val now = withFrameNanos { it }
val dtSec = (now - lastNanos).coerceAtLeast(0L) / 1_000_000_000f
lastNanos = now
idleBreathPhase.floatValue =
(idleBreathPhase.floatValue + dtSec * SPHERE_IDLE_BREATH_RADIANS_PER_SEC) %
SPHERE_TWO_PI
// The frame wait plus this delay caps the gentle layer-only pulse
// near 5fps while active procedural states retain display-rate motion.
delay(SPHERE_IDLE_LAYER_FRAME_INTERVAL_MS)
}
}
val time = fixedTime ?: animatedTime.floatValue
val colorPhase = fixedColorPhase ?: animatedColorPhase.floatValue
@@ -192,18 +157,7 @@ fun MorphingSphere(
val textMeasurer = rememberTextMeasurer(cacheSize = 64)
val glyphStrings = remember { HashMap<Char, String>(32) }
Canvas(
modifier = modifier
.fillMaxSize()
.graphicsLayer {
if (motionMode == SphereMotionMode.AmbientLayer) {
val scale = 1f + sin(idleBreathPhase.floatValue) * SPHERE_IDLE_BREATH_SCALE
scaleX = scale
scaleY = scale
}
}
.clipToBounds(),
) {
Canvas(modifier = modifier.fillMaxSize().clipToBounds()) {
val canvasW = size.width
val canvasH = size.height
val cellW = canvasW / cols
@@ -1770,19 +1770,9 @@ private fun Modifier.sessionActivityBorder(
state: SessionActivityState?,
animated: Boolean,
): Modifier {
if (state == null) return this
val color = when (state) {
SessionActivityState.Starting,
SessionActivityState.Working -> RelayRefresh.Relay
SessionActivityState.NeedsInput -> RelayRefresh.Amber
SessionActivityState.BackgroundWork,
SessionActivityState.Checking,
SessionActivityState.Unavailable,
-> MaterialTheme.colorScheme.onSurfaceVariant
}
val shouldRotate = animated && (
state == SessionActivityState.Starting || state == SessionActivityState.Working
)
if (!sessionActivityShowsRowBorder(state)) return this
val color = RelayRefresh.Relay
val shouldRotate = animated
val phase = if (shouldRotate) {
val transition = rememberInfiniteTransition(label = "session-activity")
transition.animateFloat(
@@ -84,6 +84,10 @@ internal fun sessionDrawerStatus(
null -> SessionDrawerStatus.Idle
}
/** Desktop-style row emphasis is reserved for an actual foreground turn. */
internal fun sessionActivityShowsRowBorder(state: SessionActivityState?): Boolean =
state == SessionActivityState.Starting || state == SessionActivityState.Working
/**
* Normalizes live activity to the drawer's profile-scoped row identity.
*
@@ -1,7 +1,14 @@
package com.hermesandroid.relay.ui.components
import android.content.Context
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.scaleIn
import androidx.compose.animation.scaleOut
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.Row
@@ -20,13 +27,20 @@ import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
@@ -37,10 +51,12 @@ import androidx.compose.ui.unit.dp
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
/**
* "What's New" sheet, shown automatically on a version bump (RelayApp) and from
* the About screen.
* Expanded "What's New" sheet, opened from the non-blocking post-update toast
* or directly from the About screen.
*
* As of the multi-version changelog work, the single source of truth is the
* bundled [changelog.json] asset (see [ChangelogStore]). This dialog renders the
@@ -60,6 +76,9 @@ fun WhatsNewDialog(
onViewHistory: (() -> Unit)? = null,
) {
val context = LocalContext.current
val scope = rememberCoroutineScope()
var visible by remember { mutableStateOf(false) }
var exiting by remember { mutableStateOf(false) }
// Prefer the structured changelog's latest entry; fall back to the legacy
// text asset so a missing/garbled JSON never leaves the dialog empty.
val latest = remember { ChangelogStore.load(context).versions.firstOrNull() }
@@ -67,20 +86,39 @@ fun WhatsNewDialog(
latest?.toNotes() ?: parseWhatsNew(loadWhatsNew(context))
}
fun leave(afterExit: () -> Unit) {
if (exiting) return
exiting = true
scope.launch {
visible = false
delay(180)
afterExit()
}
}
LaunchedEffect(Unit) {
if (!exiting) visible = true
}
Dialog(
onDismissRequest = onDismiss,
onDismissRequest = { leave(onDismiss) },
properties = DialogProperties(usePlatformDefaultWidth = false),
) {
Surface(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp, vertical = 32.dp)
.widthIn(max = 560.dp)
.heightIn(max = 680.dp),
shape = appearanceRoundedCornerShape(24.dp),
tonalElevation = 6.dp,
AnimatedVisibility(
visible = visible,
enter = fadeIn(tween(220)) + scaleIn(tween(220), initialScale = 0.92f),
exit = fadeOut(tween(180)) + scaleOut(tween(180), targetScale = 0.96f),
) {
Column(modifier = Modifier.fillMaxWidth()) {
Surface(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp, vertical = 32.dp)
.widthIn(max = 560.dp)
.heightIn(max = 680.dp),
shape = appearanceRoundedCornerShape(24.dp),
tonalElevation = 6.dp,
) {
Column(modifier = Modifier.fillMaxWidth()) {
Row(
modifier = Modifier
.fillMaxWidth()
@@ -99,7 +137,7 @@ fun WhatsNewDialog(
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
IconButton(onClick = onDismiss) {
IconButton(onClick = { leave(onDismiss) }) {
Icon(
imageVector = Icons.Filled.Close,
contentDescription = stringResource(R.string.changelog_close),
@@ -146,20 +184,48 @@ fun WhatsNewDialog(
}
}
}
Row(
modifier = Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp, bottom = 16.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
onViewHistory?.let { action ->
androidx.compose.material3.OutlinedButton(
onClick = action,
modifier = Modifier.weight(1f),
) { Text(stringResource(R.string.whats_new_full_history)) }
WhatsNewActions(
onDismiss = { leave(onDismiss) },
onViewHistory = onViewHistory?.let { action -> { leave(action) } },
)
}
}
}
}
}
@Composable
private fun WhatsNewActions(
onDismiss: () -> Unit,
onViewHistory: (() -> Unit)?,
) {
BoxWithConstraints(
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp, end = 16.dp, bottom = 16.dp),
) {
val stackActions = LocalDensity.current.fontScale >= 1.3f || maxWidth < 320.dp
if (stackActions) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
onViewHistory?.let { action ->
OutlinedButton(onClick = action, modifier = Modifier.fillMaxWidth()) {
Text(stringResource(R.string.whats_new_full_history))
}
Button(onClick = onDismiss, modifier = Modifier.weight(1f)) {
Text(stringResource(R.string.whats_new_got_it))
}
Button(onClick = onDismiss, modifier = Modifier.fillMaxWidth()) {
Text(stringResource(R.string.whats_new_got_it))
}
}
} else {
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
onViewHistory?.let { action ->
OutlinedButton(onClick = action, modifier = Modifier.weight(1f)) {
Text(stringResource(R.string.whats_new_full_history))
}
}
Button(onClick = onDismiss, modifier = Modifier.weight(1f)) {
Text(stringResource(R.string.whats_new_got_it))
}
}
}
}
@@ -222,15 +288,55 @@ fun ColumnScope.VersionNotesBody(groups: List<WhatsNewGroup>) {
* followed by [VersionNotesBody]. Used by ChangelogScreen for each release.
*/
@Composable
fun VersionNotesBlock(entry: ChangelogVersion) {
fun VersionNotesBlock(
entry: ChangelogVersion,
showVersionLine: Boolean = true,
) {
Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
Text(
text = entry.subtitle(),
style = MaterialTheme.typography.titleSmall,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.primary,
)
VersionNotesBody(entry.toGroups())
val highlight = entry.highlight
if (highlight == null) {
if (showVersionLine) {
Text(
text = entry.subtitle(),
style = MaterialTheme.typography.titleSmall,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.primary,
)
}
VersionNotesBody(entry.toGroups())
} else {
if (showVersionLine) {
Text(
text = entry.versionLine(),
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
Text(
text = highlight.title,
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.primary,
)
highlight.summary?.takeIf { it.isNotBlank() }?.let { summary ->
Text(
text = summary,
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
)
}
VersionNotesBody(listOf(WhatsNewGroup(header = null, bullets = highlight.bullets)))
if (entry.improvements.isNotEmpty()) {
VersionNotesBody(
listOf(
WhatsNewGroup(
header = stringResource(R.string.changelog_also_improved),
bullets = entry.improvements,
),
),
)
}
}
}
}
@@ -245,12 +351,32 @@ data class ChangelogSection(
val bullets: List<String> = emptyList(),
)
/** Editorially selected reason to care about a release. */
@Serializable
data class ChangelogHighlight(
val title: String,
val summary: String? = null,
val bullets: List<String> = emptyList(),
)
/** Compact preview of noteworthy items beyond the primary highlight. */
@Serializable
data class ChangelogToastDigest(
val additionalFeatureCount: Int = 0,
val fixCount: Int = 0,
val preview: List<String> = emptyList(),
)
/** A single released version's user-facing notes. */
@Serializable
data class ChangelogVersion(
val version: String,
val title: String? = null,
val date: String? = null,
val highlight: ChangelogHighlight? = null,
val improvements: List<String> = emptyList(),
val toastDigest: ChangelogToastDigest? = null,
val playNotes: String? = null,
val sections: List<ChangelogSection> = emptyList(),
) {
/** "v1.2.0 — Make it yours · 2026-06-20" (each token optional but version). */
@@ -261,8 +387,21 @@ data class ChangelogVersion(
return head + titlePart + datePart
}
/** Compact metadata line used when a curated highlight owns the headline. */
fun versionLine(): String {
val datePart = date?.takeIf { it.isNotBlank() }?.let { " · $it" } ?: ""
return "v$version$datePart"
}
fun toGroups(): List<WhatsNewGroup> =
sections.map { WhatsNewGroup(it.header?.takeIf { h -> h.isNotBlank() }, it.bullets) }
highlight?.let { curated ->
buildList {
add(WhatsNewGroup(curated.title.takeIf { it.isNotBlank() }, curated.bullets))
if (improvements.isNotEmpty()) {
add(WhatsNewGroup("Also improved", improvements))
}
}
} ?: sections.map { WhatsNewGroup(it.header?.takeIf { h -> h.isNotBlank() }, it.bullets) }
/** Adapt this version into the dialog's [WhatsNewNotes] shape. */
fun toNotes(): WhatsNewNotes = WhatsNewNotes(
@@ -0,0 +1,341 @@
package com.hermesandroid.relay.ui.components
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.detectHorizontalDragGestures
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.KeyboardArrowDown
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.layout.onSizeChanged
import androidx.compose.ui.platform.LocalAccessibilityManager
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.LiveRegionMode
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.liveRegion
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Popup
import androidx.compose.ui.window.PopupProperties
import com.hermesandroid.relay.R
import com.hermesandroid.relay.ui.theme.appearanceRoundedCornerShape
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlin.math.abs
import kotlin.math.roundToInt
private const val DEFAULT_AUTO_DISMISS_MILLIS = 10_000L
private const val EXIT_ANIMATION_MILLIS = 180L
private const val SWIPE_DISMISS_FRACTION = 0.28f
/**
* Non-blocking post-update notice. It stays outside the dialog window so the
* app remains usable, then hands off to the full [WhatsNewDialog] only when the
* user chooses to expand it.
*/
@Composable
fun WhatsNewToast(
onDismiss: () -> Unit,
onExpand: () -> Unit,
autoDismissMillis: Long = DEFAULT_AUTO_DISMISS_MILLIS,
) {
val context = LocalContext.current
val entry = remember { ChangelogStore.load(context).versions.firstOrNull() } ?: return
val progress = remember { Animatable(1f) }
val horizontalOffset = remember { Animatable(0f) }
val scope = rememberCoroutineScope()
val accessibilityManager = LocalAccessibilityManager.current
var visible by remember { mutableStateOf(false) }
var widthPx by remember { mutableIntStateOf(1) }
fun leave(afterExit: () -> Unit) {
if (!visible) return
scope.launch {
visible = false
delay(EXIT_ANIMATION_MILLIS)
afterExit()
}
}
LaunchedEffect(Unit) {
visible = true
val recommendedTimeout = accessibilityManager?.calculateRecommendedTimeoutMillis(
originalTimeoutMillis = autoDismissMillis,
containsIcons = true,
containsText = true,
containsControls = true,
) ?: autoDismissMillis
progress.animateTo(
targetValue = 0f,
animationSpec = tween(
durationMillis = recommendedTimeout.coerceAtMost(Int.MAX_VALUE.toLong()).toInt(),
easing = LinearEasing,
),
)
leave(onDismiss)
}
Popup(
alignment = Alignment.TopCenter,
properties = PopupProperties(focusable = false),
) {
AnimatedVisibility(
visible = visible,
enter = fadeIn(tween(220)) + slideInVertically(tween(220)) { -it / 2 },
exit = fadeOut(tween(EXIT_ANIMATION_MILLIS.toInt())) +
slideOutVertically(tween(EXIT_ANIMATION_MILLIS.toInt())) { -it / 3 },
) {
val swipeProgress = (abs(horizontalOffset.value) / widthPx).coerceIn(0f, 1f)
Box(
modifier = Modifier
.windowInsetsPadding(WindowInsets.statusBars)
.padding(horizontal = 12.dp, vertical = 10.dp)
.widthIn(max = 560.dp)
.fillMaxWidth()
.offset { IntOffset(horizontalOffset.value.roundToInt(), 0) }
.alpha(1f - (swipeProgress * 0.7f))
.onSizeChanged { widthPx = it.width.coerceAtLeast(1) }
.pointerInput(onDismiss) {
var dragTarget = horizontalOffset.value
detectHorizontalDragGestures(
onDragStart = { dragTarget = horizontalOffset.value },
onHorizontalDrag = { change, amount ->
change.consume()
dragTarget += amount
scope.launch { horizontalOffset.snapTo(dragTarget) }
},
onDragEnd = {
if (abs(horizontalOffset.value) >= widthPx * SWIPE_DISMISS_FRACTION) {
scope.launch {
horizontalOffset.animateTo(
targetValue = if (horizontalOffset.value < 0) -widthPx.toFloat() else widthPx.toFloat(),
animationSpec = tween(EXIT_ANIMATION_MILLIS.toInt()),
)
onDismiss()
}
} else {
scope.launch { horizontalOffset.animateTo(0f, tween(160)) }
}
},
)
},
) {
WhatsNewToastContent(
entry = entry,
progress = progress.value,
onExpand = { leave(onExpand) },
onDismiss = { leave(onDismiss) },
)
}
}
}
}
@Composable
internal fun WhatsNewToastContent(
entry: ChangelogVersion,
progress: Float,
onExpand: () -> Unit,
onDismiss: () -> Unit,
modifier: Modifier = Modifier,
) {
val title = stringResource(R.string.whats_new_title)
val highlight = entry.highlight
Surface(
color = MaterialTheme.colorScheme.surface,
contentColor = MaterialTheme.colorScheme.onSurface,
shape = appearanceRoundedCornerShape(18.dp),
tonalElevation = 6.dp,
shadowElevation = 10.dp,
modifier = modifier.semantics { liveRegion = LiveRegionMode.Polite },
) {
Column(modifier = Modifier.fillMaxWidth()) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp, end = 6.dp, top = 10.dp, bottom = 8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Row(
modifier = Modifier
.weight(1f)
.clickable(
role = Role.Button,
onClickLabel = title,
onClick = onExpand,
)
.padding(vertical = 4.dp),
horizontalArrangement = Arrangement.spacedBy(10.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Column(modifier = Modifier.weight(1f)) {
Text(
text = "$title · v${entry.version}",
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Text(
text = highlight?.title ?: entry.title.orEmpty(),
style = MaterialTheme.typography.titleSmall,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.primary,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
highlight?.summary?.takeIf(String::isNotBlank)?.let { summary ->
Text(
text = summary,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
)
}
}
Icon(
imageVector = Icons.Filled.KeyboardArrowDown,
contentDescription = null,
tint = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.size(22.dp),
)
}
IconButton(onClick = onDismiss) {
Icon(
imageVector = Icons.Filled.Close,
contentDescription = stringResource(R.string.changelog_close),
)
}
}
entry.toastDigest?.takeIf {
it.additionalFeatureCount > 0 || it.fixCount > 0
}?.let { digest ->
HorizontalDivider(
modifier = Modifier.padding(horizontal = 16.dp),
color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.32f),
)
Row(
modifier = Modifier
.fillMaxWidth()
.clickable(
role = Role.Button,
onClickLabel = stringResource(R.string.changelog_view_all),
onClick = onExpand,
)
.padding(horizontal = 16.dp, vertical = 10.dp),
horizontalArrangement = Arrangement.spacedBy(12.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Column(modifier = Modifier.weight(1f)) {
val counts = buildList {
if (digest.additionalFeatureCount > 0) {
add(
pluralStringResource(
R.plurals.changelog_additional_feature_count,
digest.additionalFeatureCount,
digest.additionalFeatureCount,
),
)
}
if (digest.fixCount > 0) {
add(
pluralStringResource(
R.plurals.changelog_fix_count,
digest.fixCount,
digest.fixCount,
),
)
}
}
Text(
text = stringResource(
R.string.changelog_toast_also,
counts.joinToString(" · "),
),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
Text(
text = digest.preview.joinToString(", ") + "…",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
}
Row(
horizontalArrangement = Arrangement.spacedBy(2.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = stringResource(R.string.changelog_view_all),
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.primary,
maxLines = 1,
)
Icon(
imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight,
contentDescription = null,
tint = MaterialTheme.colorScheme.primary,
modifier = Modifier.size(18.dp),
)
}
}
}
LinearProgressIndicator(
progress = { progress.coerceIn(0f, 1f) },
modifier = Modifier
.fillMaxWidth()
.clearAndSetSemantics { },
color = MaterialTheme.colorScheme.primary,
trackColor = MaterialTheme.colorScheme.surfaceVariant,
)
}
}
}
@@ -3,13 +3,13 @@ package com.hermesandroid.relay.ui.screens
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.ExpandLess
@@ -21,6 +21,7 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
@@ -33,12 +34,21 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.stateDescription
import androidx.compose.ui.text.font.FontWeight
import com.hermesandroid.relay.BuildConfig
import com.hermesandroid.relay.R
import androidx.compose.ui.unit.dp
import com.hermesandroid.relay.ui.components.ChangelogStore
import com.hermesandroid.relay.ui.components.ChangelogVersion
import com.hermesandroid.relay.ui.components.VersionNotesBody
import com.hermesandroid.relay.ui.components.VersionNotesBlock
import com.hermesandroid.relay.ui.theme.appearanceRoundedCornerShape
import java.time.LocalDate
import java.time.format.DateTimeFormatter
import java.time.format.FormatStyle
import java.util.Locale
/**
* Full release history, sourced from the bundled `changelog.json` (the same
@@ -95,19 +105,26 @@ fun ChangelogScreen(
return@Scaffold
}
Column(
LazyColumn(
modifier = Modifier
.fillMaxSize()
.padding(innerPadding)
.verticalScroll(rememberScrollState())
.padding(horizontal = 16.dp, vertical = 16.dp),
.padding(innerPadding),
contentPadding = PaddingValues(horizontal = 16.dp, vertical = 16.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
versions.forEachIndexed { index, entry ->
itemsIndexed(
items = versions,
key = { _, entry -> entry.version },
) { index, entry ->
// Latest version is expanded; older ones start collapsed.
ChangelogVersionCard(
entry = entry,
initiallyExpanded = index == 0,
installed = isInstalledRelease(
releaseVersion = entry.version,
buildVersion = BuildConfig.VERSION_NAME,
flavor = BuildConfig.FLAVOR,
),
)
}
}
@@ -122,21 +139,26 @@ fun ChangelogScreen(
private fun ChangelogVersionCard(
entry: ChangelogVersion,
initiallyExpanded: Boolean,
installed: Boolean,
) {
var expanded by remember { mutableStateOf(initiallyExpanded) }
var expanded by remember(entry.version) { mutableStateOf(initiallyExpanded) }
val expansionState = stringResource(
if (expanded) R.string.changelog_state_expanded else R.string.changelog_state_collapsed,
)
Card(
modifier = Modifier.fillMaxWidth(),
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.surfaceVariant,
),
shape = RoundedCornerShape(12.dp),
shape = appearanceRoundedCornerShape(12.dp),
) {
Column(modifier = Modifier.fillMaxWidth()) {
Row(
modifier = Modifier
.fillMaxWidth()
.clickable { expanded = !expanded }
.clickable(role = Role.Button) { expanded = !expanded }
.semantics { stateDescription = expansionState }
.padding(horizontal = 16.dp, vertical = 14.dp),
verticalAlignment = Alignment.CenterVertically,
) {
@@ -148,12 +170,20 @@ private fun ChangelogVersionCard(
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.primary,
)
entry.date?.takeIf { it.isNotBlank() }?.let { date ->
Text(
text = date,
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
entry.date?.takeIf { it.isNotBlank() }?.let { date ->
Text(
text = formatReleaseDate(date),
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
if (installed) {
InstalledVersionBadge()
}
}
}
Icon(
@@ -162,7 +192,7 @@ private fun ChangelogVersionCard(
} else {
Icons.Filled.ExpandMore
},
contentDescription = if (expanded) stringResource(R.string.changelog_collapse) else stringResource(R.string.changelog_expand),
contentDescription = null,
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
@@ -174,9 +204,43 @@ private fun ChangelogVersionCard(
.padding(start = 16.dp, end = 16.dp, bottom = 16.dp),
verticalArrangement = Arrangement.spacedBy(6.dp),
) {
VersionNotesBody(entry.toGroups())
VersionNotesBlock(entry, showVersionLine = false)
}
}
}
}
}
@Composable
private fun InstalledVersionBadge() {
Surface(
color = MaterialTheme.colorScheme.primary.copy(alpha = 0.14f),
shape = appearanceRoundedCornerShape(10.dp),
) {
Text(
text = stringResource(R.string.changelog_installed),
modifier = Modifier.padding(horizontal = 8.dp, vertical = 3.dp),
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.primary,
)
}
}
internal fun formatReleaseDate(raw: String, locale: Locale = Locale.getDefault()): String =
runCatching {
DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)
.withLocale(locale)
.format(LocalDate.parse(raw))
}.getOrDefault(raw)
internal fun isInstalledRelease(
releaseVersion: String,
buildVersion: String,
flavor: String,
): Boolean {
val canonicalBuildVersion = flavor
.takeIf { it.isNotBlank() }
?.let { buildVersion.removeSuffix("-$it") }
?: buildVersion
return releaseVersion == canonicalBuildVersion
}
@@ -37,10 +37,8 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.interaction.DragInteraction
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AutoAwesome
@@ -193,13 +191,15 @@ import com.hermesandroid.relay.ui.components.BackgroundTaskCard
import com.hermesandroid.relay.ui.components.LocalRelayServerImageResolver
import com.hermesandroid.relay.ui.components.RelayServerImageResolver
import com.hermesandroid.relay.ui.components.ChatInputBar
import com.hermesandroid.relay.ui.components.ChatGitContextButton
import com.hermesandroid.relay.ui.components.ChatGitWorkspaceRail
import com.hermesandroid.relay.ui.components.ChatGitWorkspaceSummary
import com.hermesandroid.relay.ui.components.ChatFailureDetailsDialog
import com.hermesandroid.relay.ui.components.ChatFailurePanel
import com.hermesandroid.relay.viewmodel.ChatFailureRoute
import com.hermesandroid.relay.viewmodel.ChatFailureNotice
import com.hermesandroid.relay.viewmodel.scopedChatFailure
import com.hermesandroid.relay.ui.components.ConversationVoiceDock
import com.hermesandroid.relay.ui.components.CleanChatMode
import com.hermesandroid.relay.ui.components.ChatInputPickerControl
import com.hermesandroid.relay.ui.components.ChatInputPickerOption
import com.hermesandroid.relay.ui.components.ChatInputTrailing
@@ -719,6 +719,9 @@ fun ChatScreen(
onNavigateToProfileInspector: (String) -> Unit = {},
supervisedPolicy: SupervisedModePolicy = SupervisedModePolicy(),
onNavigateToBotMode: () -> Unit = {},
gitWorkspaceSummary: ChatGitWorkspaceSummary? = null,
gitWorkspaceAvailable: Boolean = gitWorkspaceSummary != null,
onNavigateToGitWorkspace: () -> Unit = {},
) {
val supervised = supervisedPolicy.enabled
val supervisedVisibility = supervisedPolicy.visibility.resolved()
@@ -1067,6 +1070,13 @@ fun ChatScreen(
connectionViewModel.physicalKeyboardEnterBehavior.collectAsState()
val convertLargePastesToAttachments by
connectionViewModel.convertLargePastesToAttachments.collectAsState()
val showGitWorkspaceInChat by
connectionViewModel.showGitWorkspaceInChat.collectAsState()
val visibleGitWorkspaceSummary = gitWorkspaceSummary?.takeIf {
!supervised && showGitWorkspaceInChat && it.branch.isNotBlank()
}
val showGitWorkspaceContextEntry =
!supervised && showGitWorkspaceInChat && gitWorkspaceAvailable
val availableSkills by chatViewModel.availableSkills.collectAsState()
val queuedMessages by chatViewModel.queuedMessages.collectAsState()
@@ -1174,12 +1184,6 @@ fun ChatScreen(
}
}
}
var ambientMode by remember { mutableStateOf(false) } // clean text-flow mode, hides chat
// Clean-mode discoverability hint: a persistent pill shown ONLY on the
// empty / new-chat view (no messages) — it teaches the long-press entry
// without nagging mid-conversation. Derived directly from the message list
// at the pill below; no one-shot timer, no auto-dismiss.
// Sphere state with debounced Thinking→Streaming (min 1.5s in Thinking)
val rawSphereState by remember {
derivedStateOf {
@@ -1415,7 +1419,6 @@ fun ChatScreen(
PetInteractionLayer(
owner = "chat-interaction-layer",
active = shouldHideChatPet(
ambientMode = ambientMode,
voiceMode = voiceUiState.voiceMode,
drawerOpenOrMoving =
drawerState.currentValue != DrawerValue.Closed ||
@@ -2996,6 +2999,12 @@ fun ChatScreen(
// info. Dropping it here declutters the actions row and frees
// width for the title subtitle.)
if (!supervised) {
if (showGitWorkspaceContextEntry) {
ChatGitContextButton(
onClick = onNavigateToGitWorkspace,
modifier = Modifier.padding(end = 4.dp),
)
}
RelayChromeIconButton(
icon = Icons.Filled.Code,
contentDescription = stringResource(R.string.cd_terminal),
@@ -3101,11 +3110,6 @@ fun ChatScreen(
}
}
}
// Clean text-flow mode has no top-bar toggle — it's a quiet
// gesture: long-press the conversation background to enter.
// Exit is the in-mode dismiss control or system back (not
// any-tap, since the mode carries its own composer). A
// first-run hint teaches the entry.
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = RelayRefresh.Background.copy(alpha = 0.96f)
@@ -3184,11 +3188,6 @@ fun ChatScreen(
}
}
// Clean text-flow mode is rendered as a full-screen overlay (a
// sibling of this Column, below) so it can own its own minimal
// composer and explicit-dismiss control. The Column always renders
// the normal chat underneath; the overlay covers it when active.
// Message list or empty state
if (messages.isEmpty() && !isStreaming && (!isLoadingHistory || isChatConnecting)) {
AnimatedContent(
@@ -3425,28 +3424,12 @@ fun ChatScreen(
modifier = Modifier
.weight(1f)
.fillMaxWidth()
// Quiet entry to clean mode: long-press the
// conversation background. Bubbles keep their own
// long-press (copy) — they consume the gesture first,
// so only presses on empty space land here. Enters
// regardless of animationEnabled — clean mode degrades
// to static text when motion is suppressed, so the
// conversation is never gated on animation.
.pointerInput(Unit) {
detectTapGestures(
onLongPress = {
haptic.performHapticFeedback(HapticFeedbackType.LongPress)
ambientMode = true
},
)
}
) {
// Ambient avatar behind messages
if (
LocalBackgroundVisualizationEnabled.current &&
(!supervised || supervisedVisibility.showAgentIdentity) &&
animationBehindChat &&
!ambientMode
animationBehindChat
) {
LocalAgentAvatar.current.Render(
state = AvatarRenderState(
@@ -4457,6 +4440,14 @@ fun ChatScreen(
}
}
visibleGitWorkspaceSummary?.let { summary ->
ChatGitWorkspaceRail(
summary = summary,
onClick = onNavigateToGitWorkspace,
modifier = Modifier.padding(horizontal = 16.dp, vertical = 4.dp),
)
}
ChatInputBar(
value = inputText,
onValueChange = { inputText = it },
@@ -4783,62 +4774,6 @@ fun ChatScreen(
}
}
// Clean-mode discoverability hint — a quiet, persistent pill teaching
// the long-press entry. Shown ONLY on the empty / new-chat view; it
// yields the bottom area whenever clean or voice mode owns it.
AnimatedVisibility(
visible = shouldShowCleanViewHint(
hasMessages = messages.isNotEmpty(),
ambientMode = ambientMode,
voiceMode = voiceUiState.voiceMode,
),
enter = fadeIn(),
exit = fadeOut(),
modifier = Modifier
.align(Alignment.BottomCenter)
.navigationBarsPadding()
.padding(bottom = 96.dp),
) {
Text(
text = stringResource(R.string.chat_clean_view_hint),
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier
.clip(RoundedCornerShape(999.dp))
.background(MaterialTheme.colorScheme.surface.copy(alpha = 0.92f))
.padding(horizontal = 16.dp, vertical = 8.dp),
)
}
// Clean text-flow mode — full-screen overlay covering the whole Box.
// Owns its own minimal composer + explicit dismiss; exit is never
// any-tap. Renders static text when motion is suppressed.
AnimatedVisibility(
visible = ambientMode,
enter = fadeIn(),
exit = fadeOut(),
modifier = Modifier.fillMaxSize(),
) {
CleanChatMode(
messages = messages,
isStreaming = isStreaming,
sphereState = sphereState,
streamingIntensity = streamingIntensity,
toolCallBurst = toolCallBurst,
animationEnabled = animationEnabled,
enabled = chatReady,
onSend = { text ->
haptic.performHapticFeedback(HapticFeedbackType.TextHandleMove)
userScrolledAwayState.value = reduceUserScrolledAway(
current = userScrolledAwayState.value,
event = ChatFollowEvent.UserSend,
)
chatViewModel.sendMessage(text)
},
onExit = { ambientMode = false },
)
}
// Voice mode overlay — covers the whole Box when voiceUiState.voiceMode
AnimatedVisibility(
visible = voiceUiState.voiceMode,
@@ -5547,15 +5482,8 @@ private fun createCameraCaptureUri(context: android.content.Context): Uri {
)
}
internal fun shouldShowCleanViewHint(
hasMessages: Boolean,
ambientMode: Boolean,
voiceMode: Boolean,
): Boolean = !hasMessages && !ambientMode && !voiceMode
/** Chat overlays that temporarily own input and must not compete with the root pet host. */
internal fun shouldHideChatPet(
ambientMode: Boolean = false,
voiceMode: Boolean = false,
drawerOpenOrMoving: Boolean = false,
commandPaletteVisible: Boolean = false,
@@ -5564,8 +5492,7 @@ internal fun shouldHideChatPet(
contextSheetVisible: Boolean = false,
backgroundProcessesVisible: Boolean = false,
agentInfoVisible: Boolean = false,
): Boolean = ambientMode ||
voiceMode ||
): Boolean = voiceMode ||
drawerOpenOrMoving ||
commandPaletteVisible ||
modelSheetVisible ||
@@ -391,6 +391,32 @@ fun ChatSettingsScreen(
HorizontalDivider()
val showGitWorkspaceInChat by
connectionViewModel.showGitWorkspaceInChat.collectAsState()
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
) {
Column(modifier = Modifier.weight(1f)) {
Text(
text = stringResource(R.string.chat_settings_show_git_workspace),
style = MaterialTheme.typography.bodyMedium,
)
Text(
text = stringResource(R.string.chat_settings_show_git_workspace_desc),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
Switch(
checked = showGitWorkspaceInChat,
onCheckedChange = connectionViewModel::setShowGitWorkspaceInChat,
)
}
HorizontalDivider()
val recentPromptsEnabled by
connectionViewModel.chatRecentPromptsEnabled.collectAsState()
Row(
File diff suppressed because it is too large Load Diff
@@ -34,6 +34,7 @@ import androidx.compose.material.icons.automirrored.filled.Chat
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
import androidx.compose.material.icons.automirrored.filled.Message
import androidx.compose.material.icons.filled.Analytics
import androidx.compose.material.icons.filled.AccountTree
import androidx.compose.material.icons.filled.Code
import androidx.compose.material.icons.filled.Devices
import androidx.compose.material.icons.filled.Extension
@@ -190,6 +191,7 @@ fun SettingsScreen(
onNavigateToManage: () -> Unit,
onNavigateToProviderUsage: () -> Unit,
onNavigateToPlugins: () -> Unit,
onNavigateToGitWorkspace: () -> Unit,
onNavigateToChatSettings: () -> Unit,
onNavigateToTerminal: () -> Unit,
onNavigateToBridge: () -> Unit,
@@ -603,6 +605,14 @@ fun SettingsScreen(
isDarkTheme = isDarkTheme,
)
SettingsCategoryRow(
icon = Icons.Filled.AccountTree,
title = stringResource(R.string.settings_git_workspace),
subtitle = stringResource(R.string.settings_git_workspace_desc),
onClick = onNavigateToGitWorkspace,
isDarkTheme = isDarkTheme,
)
SettingsCategoryRow(
icon = Icons.AutoMirrored.Filled.Chat,
title = stringResource(R.string.settings_chat),
@@ -2412,6 +2412,16 @@ class ConnectionViewModel(application: Application) : AndroidViewModel(applicati
}
}
val showGitWorkspaceInChat: StateFlow<Boolean> =
chatInputPreferencesRepository.showGitWorkspaceInChat
.stateIn(viewModelScope, SharingStarted.Eagerly, true)
fun setShowGitWorkspaceInChat(enabled: Boolean) {
viewModelScope.launch {
chatInputPreferencesRepository.setShowGitWorkspaceInChat(enabled)
}
}
// Turn-complete notification (default ON). RelayApp mirrors this into
// ChatViewModel.notifyOnTurnComplete; ChatSettingsScreen owns the toggle
// + the POST_NOTIFICATIONS runtime request on first enable.
@@ -18,6 +18,7 @@ import kotlinx.coroutines.launch
sealed interface GitStateUiState {
data object Loading : GitStateUiState
data class Unavailable(val message: String) : GitStateUiState
data class Error(val message: String) : GitStateUiState
data class Ready(val repos: List<GitRepo>, val notice: String?) : GitStateUiState
}
@@ -106,6 +107,9 @@ class GitStateViewModel(application: Application) : AndroidViewModel(application
private val _writeGrant = MutableStateFlow(false)
val writeGrant: StateFlow<Boolean> = _writeGrant.asStateFlow()
private val _selectedRepoId = MutableStateFlow<String?>(null)
val selectedRepoId: StateFlow<String?> = _selectedRepoId.asStateFlow()
private var api: GitStateApiClient? = null
private var reposJob: Job? = null
private var detailJob: Job? = null
@@ -114,13 +118,11 @@ class GitStateViewModel(application: Application) : AndroidViewModel(application
private var messageJob: Job? = null
private var scopeKey: String? = null
private var targetGeneration: Long = 0
private var selectedRepoId: String? = null
fun selectedRepoIdForDisplay(): String? = selectedRepoId
fun selectedRepoIdForDisplay(): String? = _selectedRepoId.value
fun currentTarget(): GitTarget? {
val owner = scopeKey ?: return null
val repo = selectedRepoId ?: return null
val repo = _selectedRepoId.value ?: return null
return GitTarget(owner, repo, targetGeneration)
}
@@ -132,7 +134,7 @@ class GitStateViewModel(application: Application) : AndroidViewModel(application
messageJob?.cancel()
targetGeneration += 1
scopeKey = ownerKey
selectedRepoId = null
_selectedRepoId.value = null
_writeGrant.value = false
_detail.value = GitRepoDetailState.Idle
_content.value = GitContentViewState.Idle
@@ -168,7 +170,17 @@ class GitStateViewModel(application: Application) : AndroidViewModel(application
},
onFailure = { error ->
if (scopeKey == expectedScope) {
_repos.value = GitStateUiState.Error(error.message ?: "Failed to load repositories")
val message = error.message.orEmpty()
_repos.value = if (
message.contains("HTTP 404", ignoreCase = true) ||
message.contains("No such API endpoint", ignoreCase = true)
) {
GitStateUiState.Unavailable(
"Git isn't available on this Hermes host yet.",
)
} else {
GitStateUiState.Error(message.ifBlank { "Failed to load repositories" })
}
}
},
)
@@ -178,7 +190,7 @@ class GitStateViewModel(application: Application) : AndroidViewModel(application
fun selectRepo(repoId: String) {
val client = api ?: return
targetGeneration += 1
selectedRepoId = repoId
_selectedRepoId.value = repoId
val target = currentTarget() ?: return
_content.value = GitContentViewState.Idle
_mutation.value = GitMutationState.Idle
+24 -9
View File
@@ -136,7 +136,6 @@
<string name="chat_editing_notice">Editando — a conversa será retrocedida</string>
<string name="chat_mic_perm_needed">Permissão do microfone necessária</string>
<string name="chat_mic_perm_body">Toque em Abrir Configurações e permita o acesso ao microfone para usar o modo de voz.</string>
<string name="chat_clean_view_hint">Mantenha o chat pressionado para uma visualização limpa e focada</string>
<string name="chat_manage_connections">Gerenciar conexões</string>
<string name="chat_no_clipboard_image">Nenhuma imagem na área de transferência</string>
<string name="chat_copied_to_clipboard">Copiado para a área de transferência</string>
@@ -566,6 +565,20 @@
<string name="changelog_no_notes">Nenhuma nota de versão disponível.</string>
<string name="changelog_collapse">Recolher</string>
<string name="changelog_expand">Expandir</string>
<string name="changelog_state_expanded">Expandido</string>
<string name="changelog_state_collapsed">Recolhido</string>
<string name="changelog_installed">Instalado</string>
<string name="changelog_also_improved">Também melhorado</string>
<string name="changelog_toast_also">Também: %1$s</string>
<string name="changelog_view_all">Ver tudo</string>
<plurals name="changelog_additional_feature_count">
<item quantity="one">%1$d recurso</item>
<item quantity="other">%1$d recursos</item>
</plurals>
<plurals name="changelog_fix_count">
<item quantity="one">%1$d correção</item>
<item quantity="other">%1$d correções</item>
</plurals>
<!-- DiagnosticsScreen -->
<string name="diag_title">Diagnóstico</string>
<string name="diag_back">Voltar</string>
@@ -668,7 +681,7 @@
<string name="settings_developer_options">Opções do desenvolvedor</string>
<string name="settings_developer_options_desc">Flags de recursos, gerenciamento de dados e opções experimentais</string>
<string name="settings_whats_new">Novidades</string>
<string name="settings_whats_new_desc">Notas de versão e changelog completo</string>
<string name="settings_whats_new_desc">Histórico de versões do Android</string>
<string name="settings_about">Sobre</string>
<string name="settings_about_desc">Versão, créditos e documentação</string>
<string name="settings_profile_lock">Bloqueio de perfil</string>
@@ -2503,8 +2516,6 @@
<string name="power_gate_explanation_expired">Sua sessão do relay não é mais aceita pelo servidor. Abra a conexão para reparar.</string>
<string name="power_gate_explanation_unavailable">Este servidor Hermes não oferece a superfície necessária para este recurso.</string>
<string name="power_gate_explanation_signin">Este recurso padrão do painel exige login no painel antes de ser usado.</string>
<!-- AgentTextFlow / CleanModeComposer -->
<string name="agent_text_placeholder">Mensagem</string>
<!-- ExtraKeysToolbar -->
<string name="extra_keys_esc">ESC</string>
<string name="extra_keys_tab">TAB</string>
@@ -2892,7 +2903,6 @@
<!-- InsecureConnectionAckDialog -->
<!-- SessionTtlPickerDialog -->
<!-- PowerFeatureGate -->
<!-- AgentTextFlow / CleanModeComposer -->
<!-- ExtraKeysToolbar -->
<!-- ToolProgressCard -->
<!-- AgentIconRow -->
@@ -2948,10 +2958,6 @@
<string name="chat_relay_sessions_summary">Veja e revogue os dispositivos pareados com este relay.</string>
<string name="chat_relay_sessions_title">Sessões do Relay</string>
<string name="chat_rename_failed">Falha ao renomear</string>
<!-- AgentTextFlow -->
<string name="agent_text_send_cd">Enviar</string>
<string name="agent_text_exit_clean">Sair do modo limpo</string>
<string name="agent_text_sphere_desc">Agente</string>
<!-- UpdateBanner format strings (with version placeholders) -->
<string name="update_banner_available_fmt">Atualização disponível — v%1$s</string>
<string name="update_banner_body_fmt">Você está na %1$s. Toque em Atualizar para baixar.</string>
@@ -4265,4 +4271,13 @@
<string name="custom_theme_saved_to">Alterações salvas em %1$s</string>
<string name="custom_theme_modified">Alterações não salvas</string>
<string name="custom_theme_saved_count">%1$d temas salvos</string>
<string name="chat_settings_show_git_workspace">Mostrar o espaço de trabalho Git no chat</string>
<string name="chat_settings_show_git_workspace_desc">Mostra a branch e as alterações acima do campo de mensagem</string>
<string name="chat_git_open_workspace">Abrir o espaço de trabalho Git</string>
<string name="chat_git_branch">Branch %1$s</string>
<string name="chat_git_additions">%1$d adições</string>
<string name="chat_git_deletions">%1$d exclusões</string>
<plurals name="chat_git_change_count"><item quantity="one">%1$d alteração</item><item quantity="other">%1$d alterações</item></plurals>
<string name="settings_git_workspace">Espaço de trabalho Git</string>
<string name="settings_git_workspace_desc">Revise alterações, branches, commits e remotos</string>
</resources>
+22 -10
View File
@@ -150,7 +150,6 @@
<string name="chat_editing_notice">编辑中——将回退对话</string>
<string name="chat_mic_perm_needed">需要麦克风权限</string>
<string name="chat_mic_perm_body">点击“打开设置”并授予麦克风权限以使用语音模式。</string>
<string name="chat_clean_view_hint">长按聊天进入清爽专注视图</string>
<string name="chat_manage_connections">管理连接</string>
<string name="chat_no_clipboard_image">剪贴板中没有图片</string>
<string name="chat_copied_to_clipboard">已复制到剪贴板</string>
@@ -603,6 +602,18 @@
<string name="changelog_no_notes">暂无发行说明。</string>
<string name="changelog_collapse">收起</string>
<string name="changelog_expand">展开</string>
<string name="changelog_state_expanded">已展开</string>
<string name="changelog_state_collapsed">已收起</string>
<string name="changelog_installed">已安装</string>
<string name="changelog_also_improved">其他改进</string>
<string name="changelog_toast_also">另外:%1$s</string>
<string name="changelog_view_all">查看全部</string>
<plurals name="changelog_additional_feature_count">
<item quantity="other">%1$d 项功能</item>
</plurals>
<plurals name="changelog_fix_count">
<item quantity="other">%1$d 项修复</item>
</plurals>
<!-- DiagnosticsScreen -->
<string name="diag_title">诊断</string>
@@ -709,7 +720,7 @@
<string name="settings_developer_options">开发者选项</string>
<string name="settings_developer_options_desc">功能标志、数据管理、实验性</string>
<string name="settings_whats_new">新功能</string>
<string name="settings_whats_new_desc">发行说明和完整变更日志</string>
<string name="settings_whats_new_desc">Android 版本历史</string>
<string name="settings_about">关于</string>
<string name="settings_about_desc">版本、致谢、文档</string>
<string name="settings_profile_lock">配置文件锁定</string>
@@ -2610,9 +2621,6 @@
<string name="power_gate_explanation_unavailable">此 Hermes 服务器未暴露此功能所需的接口。</string>
<string name="power_gate_explanation_signin">此标准仪表盘功能需要在登录后才能使用。</string>
<!-- AgentTextFlow / CleanModeComposer -->
<string name="agent_text_placeholder">消息</string>
<!-- ExtraKeysToolbar -->
<string name="extra_keys_esc">ESC</string>
<string name="extra_keys_tab">TAB</string>
@@ -3053,11 +3061,6 @@
<string name="chat_rename_failed">重命名失败</string>
<string name="chat_only_active_revoke">现在只能撤销活动连接</string>
<!-- AgentTextFlow -->
<string name="agent_text_send_cd">发送</string>
<string name="agent_text_exit_clean">退出简洁模式</string>
<string name="agent_text_sphere_desc">代理</string>
<!-- UpdateBanner (format strings with version placeholders) -->
<string name="update_banner_available_fmt">更新可用 &#8212; v%1$s</string>
@@ -4350,4 +4353,13 @@
<string name="custom_theme_saved_to">更改已保存到 %1$s</string>
<string name="custom_theme_modified">未保存的更改</string>
<string name="custom_theme_saved_count">已保存 %1$d 个预设</string>
<string name="chat_settings_show_git_workspace">在聊天中显示 Git 工作区</string>
<string name="chat_settings_show_git_workspace_desc">在输入框上方显示分支和更改</string>
<string name="chat_git_open_workspace">打开 Git 工作区</string>
<string name="chat_git_branch">分支 %1$s</string>
<string name="chat_git_additions">新增 %1$d 行</string>
<string name="chat_git_deletions">删除 %1$d 行</string>
<plurals name="chat_git_change_count"><item quantity="other">%1$d 个更改</item></plurals>
<string name="settings_git_workspace">Git 工作区</string>
<string name="settings_git_workspace_desc">查看更改、分支、提交和远程仓库</string>
</resources>
+24 -12
View File
@@ -150,7 +150,6 @@
<string name="chat_editing_notice">Bearbeitung — setzt die Unterhaltung zurück</string>
<string name="chat_mic_perm_needed">Mikrofonberechtigung erforderlich</string>
<string name="chat_mic_perm_body">Tippe auf Einstellungen öffnen und erteile Mikrofonzugriff, um den Sprachmodus zu nutzen.</string>
<string name="chat_clean_view_hint">Halte den Chat gedrückt für eine aufgeräumte, fokussierte Ansicht</string>
<string name="chat_manage_connections">Verbindungen verwalten</string>
<string name="chat_no_clipboard_image">Kein Bild in der Zwischenablage</string>
<string name="chat_copied_to_clipboard">In die Zwischenablage kopiert</string>
@@ -603,6 +602,20 @@
<string name="changelog_no_notes">Keine Versionshinweise verfügbar.</string>
<string name="changelog_collapse">Einklappen</string>
<string name="changelog_expand">Ausklappen</string>
<string name="changelog_state_expanded">Ausgeklappt</string>
<string name="changelog_state_collapsed">Eingeklappt</string>
<string name="changelog_installed">Installiert</string>
<string name="changelog_also_improved">Außerdem verbessert</string>
<string name="changelog_toast_also">Außerdem: %1$s</string>
<string name="changelog_view_all">Alle anzeigen</string>
<plurals name="changelog_additional_feature_count">
<item quantity="one">%1$d Funktion</item>
<item quantity="other">%1$d Funktionen</item>
</plurals>
<plurals name="changelog_fix_count">
<item quantity="one">%1$d Fehlerbehebung</item>
<item quantity="other">%1$d Fehlerbehebungen</item>
</plurals>
<!-- DiagnosticsScreen -->
<string name="diag_title">Diagnose</string>
@@ -709,7 +722,7 @@
<string name="settings_developer_options">Entwickleroptionen</string>
<string name="settings_developer_options_desc">Funktionsschalter, Datenverwaltung, Experimente</string>
<string name="settings_whats_new">Neuigkeiten</string>
<string name="settings_whats_new_desc">Versionshinweise und vollständiges Änderungsprotokoll</string>
<string name="settings_whats_new_desc">Android-Versionsverlauf</string>
<string name="settings_about">Info</string>
<string name="settings_about_desc">Version, Mitwirkende, Dokumentation</string>
<string name="settings_profile_lock">Profilsperre</string>
@@ -2613,9 +2626,6 @@
<string name="power_gate_explanation_unavailable">Dieser Hermes-Server stellt die für diese Funktion benötigte Oberfläche nicht bereit.</string>
<string name="power_gate_explanation_signin">Diese Standard-Dashboard-Funktion erfordert vor der Nutzung eine Dashboard-Anmeldung.</string>
<!-- AgentTextFlow / CleanModeComposer -->
<string name="agent_text_placeholder">Nachricht</string>
<!-- ExtraKeysToolbar -->
<string name="extra_keys_esc">ESC</string>
<string name="extra_keys_tab">TAB</string>
@@ -3032,8 +3042,6 @@
<!-- PowerFeatureGate -->
<!-- AgentTextFlow / CleanModeComposer -->
<!-- ExtraKeysToolbar -->
<!-- ToolProgressCard -->
@@ -3116,11 +3124,6 @@
<string name="chat_rename_failed">Umbenennen fehlgeschlagen</string>
<!-- AgentTextFlow -->
<string name="agent_text_send_cd">Senden</string>
<string name="agent_text_exit_clean">Aufgeräumten Modus beenden</string>
<string name="agent_text_sphere_desc">Agent</string>
<!-- UpdateBanner format strings (with version placeholders) -->
<string name="update_banner_available_fmt">Aktualisierung verfügbar &#8212; v%1$s</string>
@@ -4425,4 +4428,13 @@
<string name="custom_theme_saved_to">Änderungen in %1$s gespeichert</string>
<string name="custom_theme_modified">Nicht gespeicherte Änderungen</string>
<string name="custom_theme_saved_count">%1$d gespeicherte Presets</string>
<string name="chat_settings_show_git_workspace">Git-Arbeitsbereich im Chat anzeigen</string>
<string name="chat_settings_show_git_workspace_desc">Zeigt Branch und Änderungen über dem Eingabefeld an</string>
<string name="chat_git_open_workspace">Git-Arbeitsbereich öffnen</string>
<string name="chat_git_branch">Branch %1$s</string>
<string name="chat_git_additions">%1$d Hinzufügungen</string>
<string name="chat_git_deletions">%1$d Löschungen</string>
<plurals name="chat_git_change_count"><item quantity="one">%1$d Änderung</item><item quantity="other">%1$d Änderungen</item></plurals>
<string name="settings_git_workspace">Git-Arbeitsbereich</string>
<string name="settings_git_workspace_desc">Änderungen, Branches, Commits und Remotes prüfen</string>
</resources>
+24 -6
View File
@@ -127,7 +127,6 @@
<string name="chat_editing_notice">Editando: rebobinará la conversación</string>
<string name="chat_mic_perm_needed">Se necesita permiso para el micrófono</string>
<string name="chat_mic_perm_body">Toque Abrir configuración y otorgue acceso al micrófono para usar el modo de voz.</string>
<string name="chat_clean_view_hint">Mantenga el chat para una vista clara y enfocada</string>
<string name="chat_manage_connections">Administrar conexiones</string>
<string name="chat_no_clipboard_image">No hay ninguna imagen en el portapapeles</string>
<string name="chat_copied_to_clipboard">Copiado al portapapeles</string>
@@ -538,6 +537,20 @@
<string name="changelog_no_notes">No hay notas de versión disponibles.</string>
<string name="changelog_collapse">Colapsar</string>
<string name="changelog_expand">Expandir</string>
<string name="changelog_state_expanded">Expandido</string>
<string name="changelog_state_collapsed">Contraído</string>
<string name="changelog_installed">Instalada</string>
<string name="changelog_also_improved">También mejorado</string>
<string name="changelog_toast_also">También: %1$s</string>
<string name="changelog_view_all">Ver todo</string>
<plurals name="changelog_additional_feature_count">
<item quantity="one">%1$d función</item>
<item quantity="other">%1$d funciones</item>
</plurals>
<plurals name="changelog_fix_count">
<item quantity="one">%1$d corrección</item>
<item quantity="other">%1$d correcciones</item>
</plurals>
<string name="diag_title">Diagnóstico</string>
<string name="diag_back">Atrás</string>
<string name="diag_status">Estado</string>
@@ -636,7 +649,7 @@
<string name="settings_developer_options">Opciones de desarrollador</string>
<string name="settings_developer_options_desc">Indicadores de funciones, gestión de datos, experimental.</string>
<string name="settings_whats_new">Novedades</string>
<string name="settings_whats_new_desc">Notas de la versión y registro de cambios completo</string>
<string name="settings_whats_new_desc">Historial de versiones de Android</string>
<string name="settings_about">Acerca de</string>
<string name="settings_about_desc">Versión, créditos, documentos.</string>
<string name="settings_profile_lock">Bloqueo de perfil</string>
@@ -2391,7 +2404,6 @@
<string name="power_gate_explanation_expired">El servidor ya no acepta su sesión relay. Abra la conexión para reparar.</string>
<string name="power_gate_explanation_unavailable">Este servidor Hermes no expone la superficie necesaria para esta función.</string>
<string name="power_gate_explanation_signin">Esta función estándar del panel necesita iniciar sesión en el panel antes de poder usarse.</string>
<string name="agent_text_placeholder">Mensaje</string>
<string name="extra_keys_esc">ESC</string>
<string name="extra_keys_tab">PESTAÑA</string>
<string name="extra_keys_ctrl">CONTROL</string>
@@ -2779,9 +2791,6 @@
<string name="chat_relay_sessions_summary">Ver y revocar dispositivos emparejados con este relay.</string>
<string name="chat_relay_sessions_title">Sesiones Relay</string>
<string name="chat_rename_failed">Error al cambiar el nombre</string>
<string name="agent_text_send_cd">Enviar</string>
<string name="agent_text_exit_clean">Salir del modo limpio</string>
<string name="agent_text_sphere_desc">Agente</string>
<string name="update_banner_available_fmt">Actualización disponible: v%1$s</string>
<string name="update_banner_body_fmt">Estás en %1$s. Toque Actualizar para descargar.</string>
<string name="attach_viewer_cd_close">Cerrar</string>
@@ -4110,4 +4119,13 @@
<string name="custom_theme_saved_to">Cambios guardados en %1$s</string>
<string name="custom_theme_modified">Cambios sin guardar</string>
<string name="custom_theme_saved_count">%1$d preajustes guardados</string>
<string name="chat_settings_show_git_workspace">Mostrar el espacio de Git en el chat</string>
<string name="chat_settings_show_git_workspace_desc">Muestra la rama y los cambios encima del cuadro de texto</string>
<string name="chat_git_open_workspace">Abrir el espacio de Git</string>
<string name="chat_git_branch">Rama %1$s</string>
<string name="chat_git_additions">%1$d adiciones</string>
<string name="chat_git_deletions">%1$d eliminaciones</string>
<plurals name="chat_git_change_count"><item quantity="one">%1$d cambio</item><item quantity="other">%1$d cambios</item></plurals>
<string name="settings_git_workspace">Espacio de Git</string>
<string name="settings_git_workspace_desc">Revisa cambios, ramas, commits y remotos</string>
</resources>
+22 -12
View File
@@ -150,7 +150,6 @@
<string name="chat_editing_notice">編集中 — 会話を巻き戻します</string>
<string name="chat_mic_perm_needed">マイクの許可が必要です</string>
<string name="chat_mic_perm_body">[設定を開く] をタップし、音声モードを使用するためのマイクへのアクセスを許可します。</string>
<string name="chat_clean_view_hint">チャットを保留すると、すっきりとした集中的なビューが得られます</string>
<string name="chat_manage_connections">接続を管理する</string>
<string name="chat_no_clipboard_image">クリップボードに画像がありません</string>
<string name="chat_copied_to_clipboard">クリップボードにコピーされました</string>
@@ -603,6 +602,18 @@
<string name="changelog_no_notes">リリースノートはありません。</string>
<string name="changelog_collapse">崩壊</string>
<string name="changelog_expand">拡大する</string>
<string name="changelog_state_expanded">展開済み</string>
<string name="changelog_state_collapsed">折りたたみ済み</string>
<string name="changelog_installed">インストール済み</string>
<string name="changelog_also_improved">その他の改善</string>
<string name="changelog_toast_also">その他: %1$s</string>
<string name="changelog_view_all">すべて表示</string>
<plurals name="changelog_additional_feature_count">
<item quantity="other">%1$d 件の機能</item>
</plurals>
<plurals name="changelog_fix_count">
<item quantity="other">%1$d 件の修正</item>
</plurals>
<!-- DiagnosticsScreen -->
<string name="diag_title">診断</string>
@@ -709,7 +720,7 @@
<string name="settings_developer_options">開発者向けオプション</string>
<string name="settings_developer_options_desc">機能フラグ、データ管理、実験的</string>
<string name="settings_whats_new">新着情報</string>
<string name="settings_whats_new_desc">リリースノートと完全な変更ログ</string>
<string name="settings_whats_new_desc">Android のリリース履歴</string>
<string name="settings_about">について</string>
<string name="settings_about_desc">バージョン、クレジット、ドキュメント</string>
<string name="settings_profile_lock">プロファイルロック</string>
@@ -2624,9 +2635,6 @@
<string name="power_gate_explanation_unavailable">この Hermes サーバーは、この機能に必要なサーフェスを公開しません。</string>
<string name="power_gate_explanation_signin">この標準のダッシュボード機能を使用するには、ダッシュボードにサインインする必要があります。</string>
<!-- AgentTextFlow / CleanModeComposer -->
<string name="agent_text_placeholder">メッセージ</string>
<!-- ExtraKeysToolbar -->
<string name="extra_keys_esc">ESC</string>
<string name="extra_keys_tab">タブ</string>
@@ -3042,8 +3050,6 @@
<!-- PowerFeatureGate -->
<!-- AgentTextFlow / CleanModeComposer -->
<!-- ExtraKeysToolbar -->
<!-- ToolProgressCard -->
@@ -3126,11 +3132,6 @@
<string name="chat_rename_failed">名前の変更に失敗しました</string>
<!-- AgentTextFlow -->
<string name="agent_text_send_cd">送信</string>
<string name="agent_text_exit_clean">クリーンモードを終了する</string>
<string name="agent_text_sphere_desc">エージェント</string>
<!-- UpdateBanner format strings (with version placeholders) -->
<string name="update_banner_available_fmt">利用可能なアップデート &#8212; v%1$s</string>
@@ -4423,4 +4424,13 @@
<string name="custom_theme_saved_to">変更を %1$s に保存しました</string>
<string name="custom_theme_modified">未保存の変更</string>
<string name="custom_theme_saved_count">保存済み %1$d 件</string>
<string name="chat_settings_show_git_workspace">チャットに Git ワークスペースを表示</string>
<string name="chat_settings_show_git_workspace_desc">入力欄の上にブランチと変更内容を表示します</string>
<string name="chat_git_open_workspace">Git ワークスペースを開く</string>
<string name="chat_git_branch">ブランチ %1$s</string>
<string name="chat_git_additions">%1$d 件の追加</string>
<string name="chat_git_deletions">%1$d 件の削除</string>
<plurals name="chat_git_change_count"><item quantity="other">%1$d 件の変更</item></plurals>
<string name="settings_git_workspace">Git ワークスペース</string>
<string name="settings_git_workspace_desc">変更、ブランチ、コミット、リモートを確認</string>
</resources>
+28 -6
View File
@@ -144,7 +144,6 @@
<string name="chat_editing_notice">Редактирование — перемотает беседу</string>
<string name="chat_mic_perm_needed">Требуется разрешение на микрофон</string>
<string name="chat_mic_perm_body">Нажмите Открыть настройки и предоставьте доступ к микрофону для использования голосового режима.</string>
<string name="chat_clean_view_hint">Удерживайте чат для чистого, сфокусированного представления</string>
<string name="chat_manage_connections">Управление подключениями</string>
<string name="chat_no_clipboard_image">Нет изображения в буфере обмена</string>
<string name="chat_copied_to_clipboard">Скопировано в буфер обмена</string>
@@ -581,6 +580,24 @@
<string name="changelog_no_notes">Заметки о выпуске недоступны.</string>
<string name="changelog_collapse">Свернуть</string>
<string name="changelog_expand">Развернуть</string>
<string name="changelog_state_expanded">Развернуто</string>
<string name="changelog_state_collapsed">Свернуто</string>
<string name="changelog_installed">Установлено</string>
<string name="changelog_also_improved">Также улучшено</string>
<string name="changelog_toast_also">Также: %1$s</string>
<string name="changelog_view_all">Показать все</string>
<plurals name="changelog_additional_feature_count">
<item quantity="one">%1$d функция</item>
<item quantity="few">%1$d функции</item>
<item quantity="many">%1$d функций</item>
<item quantity="other">%1$d функции</item>
</plurals>
<plurals name="changelog_fix_count">
<item quantity="one">%1$d исправление</item>
<item quantity="few">%1$d исправления</item>
<item quantity="many">%1$d исправлений</item>
<item quantity="other">%1$d исправления</item>
</plurals>
<string name="diag_title">Диагностика</string>
<string name="diag_back">Назад</string>
<string name="diag_status">Статус</string>
@@ -679,7 +696,7 @@
<string name="settings_developer_options">Настройки разработчика</string>
<string name="settings_developer_options_desc">Флаги функций, управление данными, экспериментальные</string>
<string name="settings_whats_new">Что нового</string>
<string name="settings_whats_new_desc">Примечания к выпуску и полный журнал изменений</string>
<string name="settings_whats_new_desc">История выпусков Android</string>
<string name="settings_about">О приложении</string>
<string name="settings_about_desc">Версия, кредиты, документация</string>
<string name="settings_profile_lock">Блокировка профиля</string>
@@ -2602,7 +2619,6 @@
<string name="power_gate_explanation_expired">Ваша сессия Relay больше не принимается сервером. Откройте соединение для восстановления.</string>
<string name="power_gate_explanation_unavailable">Этот сервер Гермеса не предоставляет необходимую поверхность для этой функции.</string>
<string name="power_gate_explanation_signin">Эта стандартная функция панели управления требует входа в панель управления перед использованием.</string>
<string name="agent_text_placeholder">Сообщение</string>
<string name="extra_keys_esc">ESC</string>
<string name="extra_keys_tab">TAB</string>
<string name="extra_keys_ctrl">CTRL</string>
@@ -2996,9 +3012,6 @@
<string name="chat_relay_sessions_summary">Просмотр и отзыв устройств, сопряженных с этим Relay.</string>
<string name="chat_relay_sessions_title">Сессии Relay</string>
<string name="chat_rename_failed">Переименование не удалось</string>
<string name="agent_text_send_cd">Отправить</string>
<string name="agent_text_exit_clean">Выход из чистого режима</string>
<string name="agent_text_sphere_desc">Агент</string>
<string name="update_banner_available_fmt">Доступно обновление \&amp;#8212; v%1$s</string>
<string name="update_banner_body_fmt">Вы используете %1$s. Нажмите Обновить, чтобы скачать.</string>
<string name="attach_viewer_cd_close">Закрыть</string>
@@ -4152,4 +4165,13 @@
<string name="custom_theme_saved_to">Изменения сохранены в %1$s</string>
<string name="custom_theme_modified">Несохраненные изменения</string>
<string name="custom_theme_saved_count">Сохранено тем: %1$d</string>
<string name="chat_settings_show_git_workspace">Показывать рабочую область Git в чате</string>
<string name="chat_settings_show_git_workspace_desc">Показывает ветку и изменения над полем ввода</string>
<string name="chat_git_open_workspace">Открыть рабочую область Git</string>
<string name="chat_git_branch">Ветка %1$s</string>
<string name="chat_git_additions">Добавлено строк: %1$d</string>
<string name="chat_git_deletions">Удалено строк: %1$d</string>
<plurals name="chat_git_change_count"><item quantity="one">%1$d изменение</item><item quantity="few">%1$d изменения</item><item quantity="many">%1$d изменений</item><item quantity="other">%1$d изменения</item></plurals>
<string name="settings_git_workspace">Рабочая область Git</string>
<string name="settings_git_workspace_desc">Изменения, ветки, коммиты и удалённые репозитории</string>
</resources>
+27 -12
View File
@@ -154,7 +154,6 @@
<string name="chat_editing_notice">Editing — will rewind the conversation</string>
<string name="chat_mic_perm_needed">Microphone permission needed</string>
<string name="chat_mic_perm_body">Tap Open Settings and grant Microphone access to use voice mode.</string>
<string name="chat_clean_view_hint">Hold the chat for a clean, focused view</string>
<string name="chat_manage_connections">Manage connections</string>
<string name="chat_no_clipboard_image">No image on the clipboard</string>
<string name="chat_copied_to_clipboard">Copied to clipboard</string>
@@ -641,6 +640,20 @@
<string name="changelog_no_notes">No release notes available.</string>
<string name="changelog_collapse">Collapse</string>
<string name="changelog_expand">Expand</string>
<string name="changelog_state_expanded">Expanded</string>
<string name="changelog_state_collapsed">Collapsed</string>
<string name="changelog_installed">Installed</string>
<string name="changelog_also_improved">Also improved</string>
<string name="changelog_toast_also">Also: %1$s</string>
<string name="changelog_view_all">View all</string>
<plurals name="changelog_additional_feature_count">
<item quantity="one">%1$d feature</item>
<item quantity="other">%1$d features</item>
</plurals>
<plurals name="changelog_fix_count">
<item quantity="one">%1$d fix</item>
<item quantity="other">%1$d fixes</item>
</plurals>
<!-- DiagnosticsScreen -->
<string name="diag_title">Diagnostics</string>
@@ -747,7 +760,7 @@
<string name="settings_developer_options">Developer options</string>
<string name="settings_developer_options_desc">Feature flags, data management, experimental</string>
<string name="settings_whats_new">What\'s New</string>
<string name="settings_whats_new_desc">Release notes and full changelog</string>
<string name="settings_whats_new_desc">Android release history</string>
<string name="settings_about">About</string>
<string name="settings_about_desc">Version, credits, docs</string>
<string name="settings_profile_lock">Profile lock</string>
@@ -791,6 +804,16 @@
<string name="chat_settings_keep_keyboard_open_desc">Stay in the composer after sending. Turn off to dismiss the keyboard after each sent message.</string>
<string name="chat_settings_large_pastes">Convert large pastes to attachments</string>
<string name="chat_settings_large_pastes_desc">Turn pastes of 5,000 or more characters into reviewable text attachments. On by default.</string>
<string name="chat_settings_show_git_workspace">Show Git workspace in Chat</string>
<string name="chat_settings_show_git_workspace_desc">Show the Git status entry and changes rail in Chat. The full Git workspace remains available when this is off.</string>
<string name="chat_git_open_workspace">Open Git workspace</string>
<string name="chat_git_branch">Git branch %1$s</string>
<string name="chat_git_additions">%1$d additions</string>
<string name="chat_git_deletions">%1$d deletions</string>
<plurals name="chat_git_change_count">
<item quantity="one">%1$d change</item>
<item quantity="other">%1$d changes</item>
</plurals>
<string name="chat_large_paste_attached">Large paste added as a text attachment</string>
<string name="chat_large_paste_too_large">Pasted text exceeds the %1$d MB attachment limit</string>
<string name="chat_settings_physical_keyboard_enter">Physical keyboard Enter key</string>
@@ -2918,9 +2941,6 @@
<string name="power_gate_explanation_unavailable">This Hermes server does not expose the surface needed for this feature.</string>
<string name="power_gate_explanation_signin">This standard dashboard feature needs dashboard sign-in before it can be used.</string>
<!-- AgentTextFlow / CleanModeComposer -->
<string name="agent_text_placeholder">Message</string>
<!-- ExtraKeysToolbar -->
<string name="extra_keys_esc">ESC</string>
<string name="extra_keys_tab">TAB</string>
@@ -3343,8 +3363,6 @@
<!-- PowerFeatureGate -->
<!-- AgentTextFlow / CleanModeComposer -->
<!-- ExtraKeysToolbar -->
<!-- ToolProgressCard -->
@@ -3427,11 +3445,6 @@
<string name="chat_rename_failed">Rename failed</string>
<!-- AgentTextFlow -->
<string name="agent_text_send_cd">Send</string>
<string name="agent_text_exit_clean">Exit clean mode</string>
<string name="agent_text_sphere_desc">Agent</string>
<!-- UpdateBanner format strings (with version placeholders) -->
<string name="update_banner_available_fmt">Update available &#8212; v%1$s</string>
@@ -4435,4 +4448,6 @@
<string name="provider_usage_capability_relay_body">Credential pools, structured Nous balances, and OpenCode Go are provided by the Relay plugin.</string>
<string name="provider_usage_capability_basic_title">Basic usage from Hermes</string>
<string name="provider_usage_capability_basic_body">Install or update the Relay plugin for credential pools, structured Nous balances, and OpenCode Go.</string>
<string name="settings_git_workspace">Git workspace</string>
<string name="settings_git_workspace_desc">Review changes, branches, commits, and remotes</string>
</resources>
@@ -29,6 +29,25 @@ class ChatInputPreferencesTest {
assertEquals(true, repository.convertLargePastesToAttachments.first())
}
@Test
fun `Git workspace in Chat defaults on and round trips without replacing other settings`() = runTest {
val unrelatedKey = stringPreferencesKey("unrelated_git_chat_test")
val store = InMemoryChatInputDataStore(
mutablePreferencesOf(unrelatedKey to "keep-me"),
)
val repository = ChatInputPreferencesRepository(store)
assertEquals(true, repository.showGitWorkspaceInChat.first())
repository.setShowGitWorkspaceInChat(false)
assertEquals(false, repository.showGitWorkspaceInChat.first())
assertEquals("keep-me", store.data.first()[unrelatedKey])
repository.setShowGitWorkspaceInChat(true)
assertEquals(true, repository.showGitWorkspaceInChat.first())
assertEquals("keep-me", store.data.first()[unrelatedKey])
}
@Test
fun `enter defaults to send and unknown values fall back safely`() = runTest {
assertEquals(
@@ -10,17 +10,19 @@ class SessionActivityRegistryTest {
private val scope = SessionActivityScope.of("connection-a", "default")
@Test
fun `directory owner is checking until status is unavailable or confirms idle`() {
fun `directory owner stays neutral until status confirms live activity`() {
val checking = SessionActivityRegistry().reduce(
SessionActivityUpdate.ObserveOwner(owner, generation = 1, observedAtMillis = 1),
)
assertEquals(SessionActivityPhase.Idle, checking.record(owner)?.phase())
assertEquals(SessionActivityState.Checking, checking.record(owner)?.presentationState())
assertEquals(SessionActivityFreshness.Revalidating, checking.record(owner)?.freshness)
assertNull(checking.record(owner)?.presentationState())
val unavailable = checking.reduce(
SessionActivityUpdate.StatusUnavailable(scope, generation = 1, observedAtMillis = 2),
)
assertEquals(SessionActivityState.Unavailable, unavailable.record(owner)?.presentationState())
assertEquals(SessionActivityFreshness.Unavailable, unavailable.record(owner)?.freshness)
assertNull(unavailable.record(owner)?.presentationState())
val confirmedIdle = checking.reduce(activeList(scope, generation = 1))
assertEquals(SessionActivityPhase.Idle, confirmedIdle.record(owner)?.phase())
@@ -28,6 +30,17 @@ class SessionActivityRegistryTest {
assertNull(confirmedIdle.record(owner)?.presentationState())
}
@Test
fun `directory refresh cannot restore checking after active status is unavailable`() {
val state = SessionActivityRegistry()
.reduce(SessionActivityUpdate.ObserveOwner(owner, generation = 1, observedAtMillis = 1))
.reduce(SessionActivityUpdate.StatusUnavailable(scope, generation = 1, observedAtMillis = 2))
.reduce(SessionActivityUpdate.ObserveOwner(owner, generation = 1, observedAtMillis = 3))
assertEquals(SessionActivityFreshness.Unavailable, state.record(owner)?.freshness)
assertNull(state.record(owner)?.presentationState())
}
@Test
fun `directory observation cannot downgrade confirmed live evidence`() {
val state = SessionActivityRegistry()
@@ -184,7 +197,7 @@ class SessionActivityRegistryTest {
}
@Test
fun `failed or unsupported status refresh is unavailable rather than idle`() {
fun `failed or unsupported status refresh preserves evidence but presents a neutral row`() {
val state = SessionActivityRegistry()
.reduce(
SessionActivityUpdate.LiveState(
@@ -206,7 +219,7 @@ class SessionActivityRegistryTest {
assertEquals(SessionActivityPhase.Working, state.record(owner)?.phase())
assertEquals(SessionActivityFreshness.Unavailable, state.record(owner)?.freshness)
assertEquals(SessionActivityState.Unavailable, state.record(owner)?.presentationState())
assertNull(state.record(owner)?.presentationState())
}
@Test
@@ -226,7 +239,7 @@ class SessionActivityRegistryTest {
}
@Test
fun `presentation keeps starting background and revalidation distinct from working`() {
fun `presentation keeps starting and background distinct while revalidation stays neutral`() {
val starting = SessionActivityRegistry().reduce(
SessionActivityUpdate.LocalSend(owner, generation = 1, observedAtMillis = 1),
)
@@ -240,7 +253,7 @@ class SessionActivityRegistryTest {
val checking = starting.reduce(
SessionActivityUpdate.BeginGeneration(scope, generation = 2, observedAtMillis = 2),
)
assertEquals(SessionActivityState.Checking, checking.record(owner)?.presentationState())
assertNull(checking.record(owner)?.presentationState())
}
@Test
@@ -287,7 +300,7 @@ class SessionActivityRegistryTest {
}
@Test
fun `restored needs-input checkpoint stays checking until live confirmation`() {
fun `restored needs-input checkpoint stays neutral until live confirmation`() {
val state = SessionActivityRegistry().reduce(
SessionActivityUpdate.RestoreCheckpoint(
owner = owner,
@@ -298,7 +311,7 @@ class SessionActivityRegistryTest {
),
)
assertEquals(SessionActivityState.Checking, state.record(owner)?.presentationState())
assertNull(state.record(owner)?.presentationState())
}
@Test
@@ -323,7 +336,7 @@ class SessionActivityRegistryTest {
),
)
assertEquals(SessionActivityState.Checking, state.record(owner)?.presentationState())
assertNull(state.record(owner)?.presentationState())
state = state.reduce(
SessionActivityUpdate.PendingInputOpened(
@@ -0,0 +1,32 @@
package com.hermesandroid.relay.screenshots
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.onRoot
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.github.takahirom.roborazzi.captureRoboImage
import com.hermesandroid.relay.ui.screens.ChangelogScreen
import com.hermesandroid.relay.ui.theme.HermesRelayTheme
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.annotation.Config
import org.robolectric.annotation.GraphicsMode
@RunWith(AndroidJUnit4::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@Config(qualifiers = "w360dp-h640dp-xhdpi")
class ChangelogHistoryScreenshotTest {
@get:Rule val compose = createComposeRule()
@Test fun latestReleaseIsCuratedAndInstalled() {
compose.setContent {
HermesRelayTheme(appThemeId = "hermes-relay", themePreference = "dark") {
ChangelogScreen(onClose = {})
}
}
compose.onNodeWithText("Supervised Mode").assertExists()
compose.onNodeWithText("Installed").assertExists()
compose.onRoot().captureRoboImage("build/ui-regression/changelog-history.png")
}
}
@@ -0,0 +1,130 @@
package com.hermesandroid.relay.screenshots
import android.app.Application
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.test.junit4.v2.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onRoot
import androidx.compose.ui.test.performClick
import androidx.compose.ui.unit.dp
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.github.takahirom.roborazzi.captureRoboImage
import com.hermesandroid.relay.network.upstream.DashboardApiClient
import com.hermesandroid.relay.ui.components.ChatGitContextButton
import com.hermesandroid.relay.ui.components.ChatGitWorkspaceRail
import com.hermesandroid.relay.ui.components.ChatGitWorkspaceSummary
import com.hermesandroid.relay.ui.screens.GitStateScreen
import com.hermesandroid.relay.ui.theme.HermesRelayTheme
import com.hermesandroid.relay.viewmodel.GitStateViewModel
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.annotation.Config
import org.robolectric.annotation.GraphicsMode
@RunWith(AndroidJUnit4::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@Config(qualifiers = "w400dp-h800dp-432dpi")
class GitWorkspaceScreenshotTest {
@get:Rule
val compose = createComposeRule()
private lateinit var server: MockWebServer
@Before
fun setUp() {
server = MockWebServer().apply { start() }
}
@After
fun tearDown() {
server.shutdown()
}
@Test
fun detailWorkspaceMatchesApprovedInformationHierarchy() {
enqueue("""{"repos":[{"id":"hermes-relay","name":"hermes-relay","root":"/srv/projects/hermes-relay","current_branch":"main","dirty":true}]}""")
enqueue(
"""{"counts":{"staged":1,"modified":1,"untracked":1,"changes":3,"additions":24,"deletions":7},"staged":[{"path":"app/src/main/kotlin/RelayApp.kt","additions":12,"deletions":3}],"modified":[{"path":"plugin/git_state.py","additions":8,"deletions":4}],"untracked":[{"path":"docs/git-workspace.md","additions":null,"deletions":null}],"truncated":false}""",
)
enqueue("""{"branches":[{"name":"main","upstream":"origin/main","ahead":1,"behind":0,"is_current":true},{"name":"dev","upstream":"origin/dev","ahead":0,"behind":0,"is_current":false}]}""")
enqueue(
"""{"path":"plugin/git_state.py","kind":"unstaged","diff":"@@ repository containment @@\n+ def is_within_repo(path):\n- return false\n+ return path.startswith(repo_root)","truncated":false}""",
)
val app = ApplicationProvider.getApplicationContext<Application>()
val viewModel = GitStateViewModel(app)
val owner = "visual-owner"
viewModel.configure(DashboardApiClient(server.url("/").toString()), owner)
viewModel.setWriteGrant(owner, true)
compose.setContent {
HermesRelayTheme(appThemeId = "hermes-relay", themePreference = "dark") {
GitStateScreen(viewModel = viewModel, onBack = {})
}
}
compose.waitUntil(5_000) {
runCatching { compose.onNodeWithText("3 changes").assertExists() }.isSuccess
}
compose.onNodeWithContentDescription("Select plugin/git_state.py").performClick()
compose.onNodeWithText("git_state.py").performClick()
compose.waitUntil(5_000) {
runCatching { compose.onNodeWithText("@@ repository containment @@", substring = true).assertExists() }.isSuccess
}
compose.onRoot().captureRoboImage("build/store-shots/15_git_workspace.png")
}
@Test
fun chatRailMatchesApprovedCompactTreatment() {
compose.setContent {
HermesRelayTheme(appThemeId = "hermes-relay", themePreference = "dark") {
Box(
Modifier.fillMaxSize().background(androidx.compose.material3.MaterialTheme.colorScheme.background),
) {
ChatGitContextButton(
onClick = {},
modifier = Modifier.align(Alignment.TopEnd).padding(16.dp),
)
Column(
Modifier.fillMaxWidth().align(Alignment.BottomCenter).padding(16.dp),
verticalArrangement = Arrangement.spacedBy(5.dp),
) {
ChatGitWorkspaceRail(
summary = ChatGitWorkspaceSummary("main", 3, 24, 7),
onClick = {},
)
Box(
Modifier.fillMaxWidth().background(
androidx.compose.material3.MaterialTheme.colorScheme.surfaceContainer,
androidx.compose.foundation.shape.RoundedCornerShape(18.dp),
).padding(vertical = 28.dp),
)
}
}
}
}
compose.onRoot().captureRoboImage("build/ui-evidence/chat-git-workspace-rail.png")
}
private fun enqueue(body: String) {
server.enqueue(
MockResponse()
.setHeader("Content-Type", "application/json")
.setBody(body),
)
}
}
@@ -0,0 +1,114 @@
package com.hermesandroid.relay.screenshots
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.onRoot
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performTouchInput
import androidx.compose.ui.test.swipeLeft
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.github.takahirom.roborazzi.captureRoboImage
import com.hermesandroid.relay.ui.components.ChangelogStore
import com.hermesandroid.relay.ui.components.WhatsNewToast
import com.hermesandroid.relay.ui.components.WhatsNewToastContent
import com.hermesandroid.relay.ui.theme.HermesRelayTheme
import org.junit.Rule
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.annotation.Config
import org.robolectric.annotation.GraphicsMode
@RunWith(AndroidJUnit4::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@Config(qualifiers = "w360dp-h640dp-xhdpi")
class WhatsNewToastScreenshotTest {
@get:Rule val compose = createComposeRule()
@Test fun compactNoticeRemainsClearAtLargeText() {
compose.setContent {
val context = LocalContext.current
val density = LocalDensity.current
val entry = ChangelogStore.load(context).versions.first()
CompositionLocalProvider(LocalDensity provides Density(density.density, 1.35f)) {
HermesRelayTheme(appThemeId = "hermes-relay", themePreference = "dark") {
Box(
modifier = Modifier
.fillMaxSize()
.background(androidx.compose.material3.MaterialTheme.colorScheme.background)
.padding(12.dp),
contentAlignment = Alignment.TopCenter,
) {
WhatsNewToastContent(
entry = entry,
progress = 0.62f,
onExpand = {},
onDismiss = {},
)
}
}
}
}
compose.onNodeWithText("Supervised Mode").assertExists()
compose.onNodeWithText("Also: 2 fixes").assertExists()
compose.onNodeWithText("Accurate activity, safer return…").assertExists()
compose.onNodeWithText("View all").assertExists()
compose.onNodeWithContentDescription("Close").assertExists()
compose.onRoot().captureRoboImage("build/ui-regression/whats-new-toast-large-text.png")
}
@Test fun exposesExpandAndCloseActions() {
var expanded = false
var dismissed = false
compose.setContent {
val entry = ChangelogStore.load(LocalContext.current).versions.first()
HermesRelayTheme(appThemeId = "hermes-relay", themePreference = "dark") {
WhatsNewToastContent(
entry = entry,
progress = 1f,
onExpand = { expanded = true },
onDismiss = { dismissed = true },
)
}
}
compose.onNodeWithText("Supervised Mode").performClick()
expanded = false
compose.onNodeWithText("View all").performClick()
compose.onNodeWithContentDescription("Close").performClick()
assertTrue(expanded)
assertTrue(dismissed)
}
@Test fun horizontalSwipeDismissesTheNotice() {
var dismissed = false
compose.mainClock.autoAdvance = false
compose.setContent {
HermesRelayTheme(appThemeId = "hermes-relay", themePreference = "dark") {
WhatsNewToast(
onDismiss = { dismissed = true },
onExpand = {},
autoDismissMillis = 60_000L,
)
}
}
compose.mainClock.advanceTimeBy(300L)
compose.onNodeWithText("Supervised Mode").performTouchInput { swipeLeft(durationMillis = 300L) }
compose.mainClock.advanceTimeBy(300L)
assertTrue(dismissed)
}
}
@@ -0,0 +1,61 @@
package com.hermesandroid.relay.ui
import com.hermesandroid.relay.data.GitBranch
import com.hermesandroid.relay.data.GitRepo
import com.hermesandroid.relay.data.GitStatus
import com.hermesandroid.relay.data.GitStatusCounts
import com.hermesandroid.relay.data.GitStatusEntry
import com.hermesandroid.relay.viewmodel.GitRepoDetailState
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
class GitWorkspaceProjectionTest {
private val parent = GitRepo("parent", "projects", "/srv/projects")
private val nested = GitRepo("nested", "relay", "/srv/projects/hermes-relay")
@Test
fun exactSessionRootWinsAndCwdUsesLongestSegmentMatch() {
assertEquals(
nested,
selectGitRepoForWorkspace(listOf(parent, nested), null, nested.root, null),
)
assertEquals(
nested,
selectGitRepoForWorkspace(
listOf(parent, nested),
null,
null,
"/srv/projects/hermes-relay/app/src",
),
)
}
@Test
fun ambiguousCatalogDoesNotInventASelection() {
assertNull(selectGitRepoForWorkspace(listOf(parent, nested), null, null, null))
assertNull(selectGitRepoForWorkspace(listOf(parent, nested), nested.id, null, null))
assertEquals(parent, selectGitRepoForWorkspace(listOf(parent), null, null, null))
}
@Test
fun summaryCountsEachChangedPathOnce() {
val summary = buildChatGitWorkspaceSummary(
nested,
GitRepoDetailState.Ready(
status = GitStatus(
counts = GitStatusCounts(additions = 24, deletions = 7),
staged = listOf(GitStatusEntry("shared.kt")),
modified = listOf(GitStatusEntry("shared.kt"), GitStatusEntry("other.kt")),
untracked = listOf(GitStatusEntry("new.kt")),
),
branches = listOf(GitBranch("dev", isCurrent = true)),
),
)
assertEquals("dev", summary?.branch)
assertEquals(3, summary?.changeCount)
assertEquals(24, summary?.additions)
assertEquals(7, summary?.deletions)
}
}
@@ -36,6 +36,47 @@ class ChangelogParserTest {
assertEquals(listOf("a", "b"), changelog.versions[0].sections.first().bullets)
}
@Test
fun parsesCuratedHighlightAndImprovements() {
val raw = """
{
"schema": 2,
"versions": [
{
"version": "1.2.0",
"title": "A useful release",
"date": "2026-06-20",
"highlight": {
"title": "The main reason to care",
"summary": "A plain-language explanation.",
"bullets": ["a", "b", "c"]
},
"improvements": ["d", "e"],
"toastDigest": {
"additionalFeatureCount": 1,
"fixCount": 2,
"preview": ["Secondary feature", "Important fix"]
},
"playNotes": "Concise Play copy."
}
]
}
""".trimIndent()
val entry = ChangelogStore.parse(raw).versions.single()
assertEquals("The main reason to care", entry.highlight?.title)
assertEquals("A plain-language explanation.", entry.highlight?.summary)
assertEquals(listOf("a", "b", "c"), entry.highlight?.bullets)
assertEquals(listOf("d", "e"), entry.improvements)
assertEquals(1, entry.toastDigest?.additionalFeatureCount)
assertEquals(2, entry.toastDigest?.fixCount)
assertEquals(listOf("Secondary feature", "Important fix"), entry.toastDigest?.preview)
assertEquals("Concise Play copy.", entry.playNotes)
assertEquals("v1.2.0 · 2026-06-20", entry.versionLine())
assertEquals(listOf("The main reason to care", "Also improved"), entry.toGroups().map { it.header })
}
@Test
fun blankInputYieldsEmptyChangelog() {
assertTrue(ChangelogStore.parse("").versions.isEmpty())
@@ -5,12 +5,10 @@ import org.junit.Test
class MorphingSphereMotionPolicyTest {
@Test
fun `visible idle sphere uses lightweight ambient motion`() {
fun `every visible sphere uses smooth procedural motion`() {
assertEquals(
SphereMotionMode.AmbientLayer,
SphereMotionMode.Procedural,
sphereMotionMode(
state = SphereState.Idle,
voiceMode = false,
motionVisible = true,
fixedTime = null,
fixedColorPhase = null,
@@ -19,26 +17,14 @@ class MorphingSphereMotionPolicyTest {
}
@Test
fun `hidden or paused idle sphere is still`() {
fun `hidden or paused sphere is still`() {
assertEquals(
SphereMotionMode.Still,
sphereMotionMode(SphereState.Idle, false, false, null, null),
sphereMotionMode(false, null, null),
)
assertEquals(
SphereMotionMode.Still,
sphereMotionMode(SphereState.Idle, false, true, 0f, 0f),
)
}
@Test
fun `visible active and voice states keep procedural motion`() {
assertEquals(
SphereMotionMode.Procedural,
sphereMotionMode(SphereState.Thinking, false, true, null, null),
)
assertEquals(
SphereMotionMode.Procedural,
sphereMotionMode(SphereState.Idle, true, true, null, null),
sphereMotionMode(true, 0f, 0f),
)
}
}
@@ -5,6 +5,7 @@ import com.hermesandroid.relay.data.ChatSession
import com.hermesandroid.relay.data.SessionActivityState
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class SessionDrawerPolicyTest {
@@ -144,6 +145,17 @@ class SessionDrawerPolicyTest {
}
}
@Test
fun `full row border is limited to foreground live work`() {
assertTrue(sessionActivityShowsRowBorder(SessionActivityState.Starting))
assertTrue(sessionActivityShowsRowBorder(SessionActivityState.Working))
assertFalse(sessionActivityShowsRowBorder(SessionActivityState.NeedsInput))
assertFalse(sessionActivityShowsRowBorder(SessionActivityState.BackgroundWork))
assertFalse(sessionActivityShowsRowBorder(SessionActivityState.Checking))
assertFalse(sessionActivityShowsRowBorder(SessionActivityState.Unavailable))
assertFalse(sessionActivityShowsRowBorder(null))
}
@Test
fun `profile project status and pull request filters compose`() {
val wanted = row(
@@ -0,0 +1,24 @@
package com.hermesandroid.relay.ui.screens
import java.util.Locale
import org.junit.Assert.assertEquals
import org.junit.Test
class ChangelogScreenTest {
@Test
fun formatsReleaseDateForTheCurrentLocale() {
assertEquals("Aug 25, 2026", formatReleaseDate("2026-08-25", Locale.US))
}
@Test
fun preservesAnUnparseableReleaseDate() {
assertEquals("coming soon", formatReleaseDate("coming soon", Locale.US))
}
@Test
fun matchesInstalledReleaseAcrossFlavorSuffixes() {
assertEquals(true, isInstalledRelease("1.13.2", "1.13.2-sideload", "sideload"))
assertEquals(true, isInstalledRelease("1.13.2-rc.1", "1.13.2-rc.1-googlePlay", "googlePlay"))
assertEquals(false, isInstalledRelease("1.13.1", "1.13.2-sideload", "sideload"))
}
}
@@ -1,66 +0,0 @@
package com.hermesandroid.relay.ui.screens
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class ChatCleanViewHintTest {
@Test
fun petRemainsVisibleOnUnobstructedChat() {
assertFalse(shouldHideChatPet())
}
@Test
fun everyModalChatSurfaceSuppressesPet() {
assertTrue(shouldHideChatPet(ambientMode = true))
assertTrue(shouldHideChatPet(voiceMode = true))
assertTrue(shouldHideChatPet(drawerOpenOrMoving = true))
assertTrue(shouldHideChatPet(commandPaletteVisible = true))
assertTrue(shouldHideChatPet(modelSheetVisible = true))
assertTrue(shouldHideChatPet(effortSheetVisible = true))
assertTrue(shouldHideChatPet(contextSheetVisible = true))
assertTrue(shouldHideChatPet(backgroundProcessesVisible = true))
assertTrue(shouldHideChatPet(agentInfoVisible = true))
}
@Test
fun emptyTextChatShowsCleanViewHint() {
assertTrue(
shouldShowCleanViewHint(
hasMessages = false,
ambientMode = false,
voiceMode = false,
),
)
}
@Test
fun voiceModeOwnsBottomAreaOnEmptyChat() {
assertFalse(
shouldShowCleanViewHint(
hasMessages = false,
ambientMode = false,
voiceMode = true,
),
)
}
@Test
fun existingConversationOrCleanModeSuppressesHint() {
assertFalse(
shouldShowCleanViewHint(
hasMessages = true,
ambientMode = false,
voiceMode = false,
),
)
assertFalse(
shouldShowCleanViewHint(
hasMessages = false,
ambientMode = true,
voiceMode = false,
),
)
}
}
@@ -0,0 +1,25 @@
package com.hermesandroid.relay.ui.screens
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class ChatPetVisibilityTest {
@Test
fun petRemainsVisibleOnUnobstructedChat() {
assertFalse(shouldHideChatPet())
}
@Test
fun everyModalChatSurfaceSuppressesPet() {
assertTrue(shouldHideChatPet(voiceMode = true))
assertTrue(shouldHideChatPet(drawerOpenOrMoving = true))
assertTrue(shouldHideChatPet(commandPaletteVisible = true))
assertTrue(shouldHideChatPet(modelSheetVisible = true))
assertTrue(shouldHideChatPet(effortSheetVisible = true))
assertTrue(shouldHideChatPet(contextSheetVisible = true))
assertTrue(shouldHideChatPet(backgroundProcessesVisible = true))
assertTrue(shouldHideChatPet(agentInfoVisible = true))
}
}
@@ -333,7 +333,7 @@ class ChatViewModelGatewayInboundTurnTest {
}
@Test
fun unsupportedActiveListProjectsUnavailableInsteadOfRestWorking() {
fun unsupportedActiveListLeavesRowsNeutralAcrossDirectoryRefresh() {
bindActivityTestDirectory()
handler.updateSessions(
listOf(SessionItem(id = STORED_SESSION_ID, title = "Recent", isActive = true)),
@@ -344,9 +344,14 @@ class ChatViewModelGatewayInboundTurnTest {
gatewayHarness.awaitRpc("session.active_list")
awaitCondition {
viewModel.backgroundSessionActivityStates.value["default:$STORED_SESSION_ID"] ==
SessionActivityState.Unavailable
"default:$STORED_SESSION_ID" !in viewModel.backgroundSessionActivityStates.value
}
viewModel.updateSessionActivityDirectory(
rows = listOf("default" to STORED_SESSION_ID),
)
assertFalse("default:$STORED_SESSION_ID" in viewModel.backgroundSessionActivityStates.value)
}
@Test
@@ -18,6 +18,7 @@ import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
@@ -85,6 +86,20 @@ class GitStateViewModelTest {
assertTrue(state.message.isNotBlank())
}
@Test
fun `loadRepos maps missing plugin route to friendly unavailable state`() = runBlocking {
server.enqueue(
MockResponse()
.setResponseCode(404)
.setBody("""{"detail":"No such API endpoint"}"""),
)
val vm = viewModel()
val state = withTimeout(5_000) {
vm.repos.filterIsInstance<GitStateUiState.Unavailable>().first()
}
assertEquals("Git isn't available on this Hermes host yet.", state.message)
}
@Test
fun `selectRepo loads status and branches and preserves truncation flag`() = runBlocking {
enqueueJson(
@@ -107,6 +122,10 @@ class GitStateViewModelTest {
assertEquals(1, ready.status.counts.staged)
assertEquals(2, ready.status.counts.modified)
assertEquals(3, ready.status.counts.untracked)
assertEquals(-1, ready.status.counts.changes)
assertEquals(0, ready.status.counts.additions)
assertEquals(0, ready.status.counts.deletions)
assertNull(ready.status.staged.single().additions)
assertTrue(ready.status.truncated)
assertEquals("main", ready.branches.single().name)
assertTrue(ready.branches.single().isCurrent)
Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

+11
View File
@@ -94,6 +94,17 @@ therefore cannot reach Relay management APIs or acquire executable backend behav
The contribution ID `git` is reserved for the Relay plugin's native Git workspace;
generated drafts cannot shadow or duplicate that route.
Android presents that reserved contribution as a first-class native surface rather
than a generic declarative page. When the live plugin API confirms Git is available,
Chat can show a compact branch/change rail and a dot-only context action; **Chat →
Show Git workspace in Chat** hides those two Chat affordances without disabling the
workspace. The full native workspace remains reachable from Settings and Plugins and
owns repository/branch selection, diffs, staging, confirmed destructive actions,
commits, and remotes. Session `git_repo_root`/`cwd` metadata selects an exact matching
repository when possible; ambiguous catalogs require an explicit user choice. Mobile
discovery alone is not treated as runtime readiness: a missing Git API route renders a
retryable unavailable state instead of exposing the raw Dashboard error.
The Relay mobile manifest exposes drafts as preview pages under the authenticated
`hermes-relay` plugin namespace. Android polls the catalog every five seconds while
the Plugins hub is visible and polls a visible generated page every five seconds.
+11 -11
View File
@@ -13,7 +13,7 @@
"verification": "ai-translated",
"review_refs": [],
"source_sha256": {
"main": "c8a915aa7faf68a6c2b6f5e09bfe4fe69a6a60bdc9fbc2c252a3bda911c9cb36",
"main": "28d58a3b9803968124ea6581fd9dbb3a0ce2a9ee1c946228bb6f0b79f987a24a",
"sideload": "4abff4f1069091ec2de735c3037a7ec7d77699cb4321e8511a622437bceaf7c2"
},
"surfaces": {
@@ -30,7 +30,7 @@
"guide/release-tracks.md": "1e793410f433b12f503ac1649afec8820a712aff74b38202693aa9a0d6ad0a26",
"guide/troubleshooting.md": "43677454b94dd7810adc9b685266598353b851b549b151de31cfa053cf74f6c1"
},
"website_source_sha256": "2de54aed7fd3c4e02ecbf57a4e9069ce64a3fd8d2874dc41b63732924fb354e1"
"website_source_sha256": "d2d244b8b4f51dbec1503e134acdbc5252574b38511fe1fcda1b7b0a63e5f9a3"
},
"en": {
"native_name": "English",
@@ -48,7 +48,7 @@
"verification": "ai-translated",
"review_refs": [],
"source_sha256": {
"main": "c8a915aa7faf68a6c2b6f5e09bfe4fe69a6a60bdc9fbc2c252a3bda911c9cb36",
"main": "28d58a3b9803968124ea6581fd9dbb3a0ce2a9ee1c946228bb6f0b79f987a24a",
"sideload": "4abff4f1069091ec2de735c3037a7ec7d77699cb4321e8511a622437bceaf7c2"
},
"surfaces": {
@@ -65,14 +65,14 @@
"guide/release-tracks.md": "1e793410f433b12f503ac1649afec8820a712aff74b38202693aa9a0d6ad0a26",
"guide/troubleshooting.md": "43677454b94dd7810adc9b685266598353b851b549b151de31cfa053cf74f6c1"
},
"website_source_sha256": "2de54aed7fd3c4e02ecbf57a4e9069ce64a3fd8d2874dc41b63732924fb354e1"
"website_source_sha256": "d2d244b8b4f51dbec1503e134acdbc5252574b38511fe1fcda1b7b0a63e5f9a3"
},
"ja": {
"native_name": "\u65e5\u672c\u8a9e",
"verification": "ai-translated",
"review_refs": [],
"source_sha256": {
"main": "c8a915aa7faf68a6c2b6f5e09bfe4fe69a6a60bdc9fbc2c252a3bda911c9cb36",
"main": "28d58a3b9803968124ea6581fd9dbb3a0ce2a9ee1c946228bb6f0b79f987a24a",
"sideload": "4abff4f1069091ec2de735c3037a7ec7d77699cb4321e8511a622437bceaf7c2"
},
"surfaces": {
@@ -89,14 +89,14 @@
"guide/release-tracks.md": "1e793410f433b12f503ac1649afec8820a712aff74b38202693aa9a0d6ad0a26",
"guide/troubleshooting.md": "43677454b94dd7810adc9b685266598353b851b549b151de31cfa053cf74f6c1"
},
"website_source_sha256": "2de54aed7fd3c4e02ecbf57a4e9069ce64a3fd8d2874dc41b63732924fb354e1"
"website_source_sha256": "d2d244b8b4f51dbec1503e134acdbc5252574b38511fe1fcda1b7b0a63e5f9a3"
},
"pt-BR": {
"native_name": "Portugu\u00eas (Brasil)",
"verification": "ai-translated",
"review_refs": [],
"source_sha256": {
"main": "c8a915aa7faf68a6c2b6f5e09bfe4fe69a6a60bdc9fbc2c252a3bda911c9cb36",
"main": "28d58a3b9803968124ea6581fd9dbb3a0ce2a9ee1c946228bb6f0b79f987a24a",
"sideload": "4abff4f1069091ec2de735c3037a7ec7d77699cb4321e8511a622437bceaf7c2"
},
"surfaces": {
@@ -113,14 +113,14 @@
"guide/release-tracks.md": "1e793410f433b12f503ac1649afec8820a712aff74b38202693aa9a0d6ad0a26",
"guide/troubleshooting.md": "43677454b94dd7810adc9b685266598353b851b549b151de31cfa053cf74f6c1"
},
"website_source_sha256": "2de54aed7fd3c4e02ecbf57a4e9069ce64a3fd8d2874dc41b63732924fb354e1"
"website_source_sha256": "d2d244b8b4f51dbec1503e134acdbc5252574b38511fe1fcda1b7b0a63e5f9a3"
},
"ru": {
"native_name": "\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
"verification": "ai-translated",
"review_refs": [],
"source_sha256": {
"main": "c8a915aa7faf68a6c2b6f5e09bfe4fe69a6a60bdc9fbc2c252a3bda911c9cb36",
"main": "28d58a3b9803968124ea6581fd9dbb3a0ce2a9ee1c946228bb6f0b79f987a24a",
"sideload": "4abff4f1069091ec2de735c3037a7ec7d77699cb4321e8511a622437bceaf7c2"
},
"surfaces": {
@@ -135,7 +135,7 @@
"verification": "ai-translated",
"review_refs": [],
"source_sha256": {
"main": "c8a915aa7faf68a6c2b6f5e09bfe4fe69a6a60bdc9fbc2c252a3bda911c9cb36",
"main": "28d58a3b9803968124ea6581fd9dbb3a0ce2a9ee1c946228bb6f0b79f987a24a",
"sideload": "4abff4f1069091ec2de735c3037a7ec7d77699cb4321e8511a622437bceaf7c2"
},
"surfaces": {
@@ -152,7 +152,7 @@
"guide/release-tracks.md": "1e793410f433b12f503ac1649afec8820a712aff74b38202693aa9a0d6ad0a26",
"guide/troubleshooting.md": "43677454b94dd7810adc9b685266598353b851b549b151de31cfa053cf74f6c1"
},
"website_source_sha256": "2de54aed7fd3c4e02ecbf57a4e9069ce64a3fd8d2874dc41b63732924fb354e1"
"website_source_sha256": "d2d244b8b4f51dbec1503e134acdbc5252574b38511fe1fcda1b7b0a63e5f9a3"
}
}
}
+6
View File
@@ -108,6 +108,12 @@
"title": "Start a conversation",
"source": "assets/screenshots/supplemental/14_startup.png",
"captureNote": "Current empty-chat chrome, idle visualization, model and effort controls, and public-safe suggestions."
},
{
"id": "15_git_workspace",
"title": "Native Git workspace",
"source": "assets/screenshots/supplemental/15_git_workspace.png",
"captureNote": "Real native Git workspace with public-safe repository status, line totals, filters, selection, inline diff, branch controls, commit action, and no live host data."
}
]
}
+2 -2
View File
@@ -141,7 +141,7 @@ The companion has a durable home and an optional autonomous roaming mode:
dragging itself remains finger-driven.
- Roaming requires an idle agent, the foreground app, enabled animation, and an
available safe rail. Agent activity, scrolling, dragging, an open pet menu,
startup, voice, clean/ambient mode, Android animator scale 0, or TalkBack touch
startup, voice, Android animator scale 0, or TalkBack touch
exploration stops autonomous travel. During scrolling, the pet follows its
current measured or synthetic habitat rail while it remains valid; it does
not re-dock or teleport. The IME/short-screen compact layout uses 50 dp base
@@ -676,7 +676,7 @@ fallback checks with a pack missing one or more optional rows:
opening and closing the keyboard moves that dock with the input rail without
hiding the pet or placing it over transcript content.
- [ ] Opening or closing the session drawer, command palette, model/reasoning/
context/process/agent sheets, clean mode, or either voice presentation keeps
context/process/agent sheets or either voice presentation keeps
the pet absent until the owning surface has fully closed. Slash autocomplete
and recent-prompt chips remain usable and never become walkable terrain.
- [ ] After a plain assistant response, it approaches through the outer gutter,
@@ -1,6 +1,8 @@
# Clean mode, Sphere background, and floating pets — design record
# Sphere background and floating pets — design record
**Status:** Implemented; interaction model revised 2026-08-01 for #267
**Status:** Implemented; interaction model revised 2026-08-01 for #267. The
separate Chat clean-focus presentation was removed 2026-08-27; the background
visualization and floating-pet contracts remain current.
**Owner surface:** Android app shell, Chat, Terminal, and Appearance settings
## Decision
@@ -51,7 +53,7 @@ Desktop and Codex while adapting it to a phone-sized viewport.
landing squash. Idle variety cycles through hops, waves, and rests.
- Roaming runs only while Hermes is idle and the app is foregrounded. Thinking,
streaming, tool work, errors, transcript scrolling, dragging, the pet menu,
voice, clean/ambient mode, startup, and loss of a safe rail pause or dock it as
voice, startup, and loss of a safe rail pause or dock it as
appropriate. The director's fixed priority is direct interaction, agent
activity, response visit, roaming, then idle.
- App animation-off, Android animator scale 0, and TalkBack touch exploration
@@ -114,8 +116,6 @@ identity data is unchanged.
[`../sphere-spec.md`](../sphere-spec.md).
- `MorphingSphereCore` and its web parity harness remain the source of truth for
Sphere rendering.
- Clean text-flow mode remains a presentation of the active conversation, not a
separate chat or profile state.
## Out of scope
+2 -2
View File
@@ -91,9 +91,9 @@ This app is a community project and is not affiliated with or endorsed by NousRe
Paste into Play Console → **What's new** (≤500 characters):
```
v1.13.1 - Accurate session activity
v1.13.2 - Supervised Mode and clearer activity
Session activity now follows live Hermes runtime state instead of a recent-activity estimate. Working, Starting, Needs input, Idle, Checking, Unavailable, and Background work stay accurate, and stale state clears only after a complete, unambiguous update.
Supervised Mode creates a simpler, profile-focused chat with device-protected parent settings and control over attachments, Standard voice, generated media, history, actions, and technical details. Activity indicators now appear only while Hermes is genuinely working, and returning from parent settings keeps Supervised Chat open.
```
## Category
+4 -1
View File
@@ -119,7 +119,7 @@ Play 2:1 clipping), and only mock public-safe data.
### Run
```bash
./gradlew :app:testGooglePlayDebugUnitTest --tests "*StoreScreenshotTest*"
./gradlew :app:testGooglePlayDebugUnitTest --tests "*StoreScreenshotTest*" --tests "*GitWorkspaceScreenshotTest*"
# Output: app/build/store-shots/<scene>.png (1080x2160, exactly 2:1)
```
@@ -149,6 +149,9 @@ The canonical marketing lineup intentionally exercises current product seams:
coverage beyond the two Play-listing frames.
- Supplemental `14_startup` preserves the lower-information empty-chat frame
outside the eight-slot Play lineup.
- Supplemental `15_git_workspace` renders the real native Git screen from a
deterministic plugin API fixture. It is used by README, user docs, and the
website but intentionally remains outside the eight-slot Play lineup.
### Render any view going forward
+10 -8
View File
@@ -544,7 +544,7 @@ The bridge UI drives — and is driven by — Tier 5 safety-rails (`BridgeSafety
- **Data** — Android-local backup, restore, and reset with confirmation dialogs. Manage → Operations also uses the authenticated upstream dashboard to create and download server backups and to upload an explicitly confirmed zip to the guarded import staging route. Manage → Learning edits full node content and confirms deletion (Hermes archives skill nodes; memory-node deletion is permanent). Manage → Memory uses upstream discovery/config/setup and provider activation, scoped to the selected profile. Manage → Channels includes upstream WhatsApp QR onboarding, status polling, apply/cancel, and the resulting gateway restart.
- **Automation** — Manage → Cron lists and controls jobs through upstream Dashboard routes. A current authenticated Gateway also exposes **New schedule**, including an optional 1–999 run cap through native `cron.manage`; blank retains the schedule's upstream one-shot/forever default. Android never turns invalid finite counts into unlimited work and does not introduce a Relay scheduler.
- **Local reset evidence** — immediately before New chat or Thread entry replaces the visible context, Android stores a bounded app-private checkpoint containing only transport, structural counts, and lifecycle booleans. No conversation content, identifiers, profile names, URLs, paths, media, tool payloads, secrets, or telemetry leaves the device; the record is available only through the existing review-before-share Diagnostics bundle.
- **About** — logo on dark background, dynamic version from BuildConfig, Source + Docs link buttons, credits. What's New dialog.
- **About** — logo on dark background, dynamic version from BuildConfig, Source + Docs link buttons, credits. Post-update What's New uses a non-blocking timed/swipeable toast with a compact secondary feature/fix digest, then expands into the centered highlight view; About and Settings retain intentional access to the full release history.
---
@@ -1131,16 +1131,18 @@ Current Android dependency versions. Source of truth is `gradle/libs.versions.to
### 10.1 Dashboard plugin
Hermes-Relay ships a hermes-agent Dashboard Plugin that surfaces relay-specific state in the gateway's web UI. The plugin subtree at `plugin/dashboard/` is discovered when `~/.hermes/plugins/hermes-relay` points at `<repo>/plugin` or when the upstream plugin manager installs `Codename-11/hermes-relay/plugin`. The gateway scans `~/.hermes/plugins/<name>/dashboard/manifest.json` at startup. Manifest fields (`name: "hermes-relay"`, `label: "Relay"`, `icon: "Activity"`, `tab.path: "/relay"`, `tab.position: "after:skills"`) place the tab after Skills in the dashboard nav.
Hermes-Relay ships a hermes-agent Dashboard Plugin that surfaces Hermes-Relay-specific state in the gateway's web UI. The plugin subtree at `plugin/dashboard/` is discovered when `~/.hermes/plugins/hermes-relay` points at `<repo>/plugin` or when the upstream plugin manager installs `Codename-11/hermes-relay/plugin`. The gateway scans `~/.hermes/plugins/<name>/dashboard/manifest.json` at startup. Manifest fields (`name: "hermes-relay"`, `label: "Hermes-Relay"`, `icon: "Activity"`, `tab.path: "/relay"`, `tab.position: "after:skills"`) place the tab after Skills in the dashboard nav.
**Four internal tabs** render inside the single `/relay` route via a shadcn `Tabs` component:
**Six internal tabs** render inside the single `/relay` route with the upstream Dashboard Tabs primitive:
| Tab | Data source | What it shows |
|-----|-------------|---------------|
| **Relay Management** | `/api/plugins/hermes-relay/overview` + `/sessions` | Relay version + uptime + health, paired-device list (token prefix, device name, last-seen, expires-at, per-channel grants), per-row Revoke button (placeholder pending proxy route). |
| **Bridge Activity** | `/api/plugins/hermes-relay/bridge-activity` | Ring buffer of the most recent 100 bridge commands (`method`, `path`, redacted `params`, `decision`, `sent_at`, `response_status`, `error`). Filter chips: All / Executed / Blocked / Confirmed / Timeout / Error. Polls every 5s; pausable via header Auto-refresh toggle (persisted to `localStorage`). |
| **Push Console** | `/api/plugins/hermes-relay/push` | Stub — returns `{configured: false, reason: "FCM not yet wired; …"}`. Renders an FCM-not-configured banner + link to the deferred-items doc. Real data ships when FCM is wired. |
| **Media Inspector** | `/api/plugins/hermes-relay/media` | Active `MediaRegistry` tokens (basename-only file name — absolute paths never leave the server — plus `content_type`, `size`, `created_at`, `expires_at`, `last_accessed`). TTL countdown decrements in real time (`setInterval(1000)`, cleaned up on unmount). Polls every 15s. |
| **Overview** | `/overview`, `/sessions`, `/bridge-activity`, `/remote-access/status`, `/update-check` | Independently loaded service health, version, uptime, paired-device summary, primary remote route, latest Bridge activity, quick actions, and recent activity. Raw `pending_commands` and `media_entry_count` are not presented as health metrics. |
| **Devices** | `/sessions`, `/pairing`, `DELETE /sessions/{prefix}` | Side-by-side standard Dashboard setup and Hermes-Relay pairing, followed by responsive paired-device cards with expiry, transport, grants, copy, and confirmed revocation. |
| **Activity** | `/bridge-activity` + `/media` | Bridge activity and a nested **Media tokens** diagnostic view. Media tokens cover token-backed `MediaRegistry` entries only; bare-path delivery is explicitly outside this view. |
| **Remote Access** | `/remote-access/*` | Tailscale, Secure Link, public URL, reachability probes, and endpoint-aware pairing previews. |
| **Git** | `/git/*` | Opt-in repository state, diff, staging, commit, branch, and confirmed write operations. |
| **Settings** | `/phone/config`, `/agent-context`, `/update-check` | Config-style General, Agent Context, and Maintenance categories, with independently scoped failures and host-native feedback. |
**Three new loopback-gated relay routes** feed the plugin backend (plus a loopback-exempt branch on the existing `GET /sessions`). All are gated by a tiny `_require_loopback()` helper that rejects any `request.remote` other than `127.0.0.1` / `::1` with HTTP 403. Full wire-shape details in [`docs/relay-server.md`](relay-server.md#http-routes).
@@ -1153,7 +1155,7 @@ Hermes-Relay ships a hermes-agent Dashboard Plugin that surfaces relay-specific
**Auth model.** The dashboard plugin's FastAPI router mounts under `/api/plugins/hermes-relay/*` inside the gateway process (itself bound to localhost). It forwards to the relay at `http://127.0.0.1:{HERMES_RELAY_PORT}` (default 8767). Both hops are loopback-only — no bearer is minted and no new credentials are introduced. Media paths are sanitized to basename-only in `MediaRegistry.list_all()` so even a future decision to expose these routes externally wouldn't leak filesystem layout.
**Frontend.** Source under `plugin/dashboard/src/` (JSX + esbuild), committed pre-built IIFE at `plugin/dashboard/dist/index.js` (~16 KB minified). Uses the dashboard's `window.__HERMES_PLUGIN_SDK__` global for React + shadcn primitives + `fetchJSON()` — no external HTTP library, no bundled React. See ADR 19 in [`docs/decisions.md`](decisions.md) for the architectural rationale.
**Frontend.** Source under `plugin/dashboard/src/` (JSX + esbuild), committed pre-built IIFE at `plugin/dashboard/dist/index.js` (about 110 KB minified). Uses the dashboard's `window.__HERMES_PLUGIN_SDK__` global for React + Nous primitives + `fetchJSON()` — no external HTTP library and no bundled React. See ADR 19 in [`docs/decisions.md`](decisions.md) for the architectural rationale.
### 10.2 Official Desktop plugin
+5 -4
View File
@@ -1,9 +1,10 @@
# Sphere skin spec
The agent sphere (the ASCII "orb" on the empty chat screen, ambient mode, and
the voice overlay) is a **hot-swappable component**. Built-in skins ship with the
app, an **Adaptive** skin recolors to match your theme, and you can side-load your
own skins from a small JSON file. This document is the authoring reference.
The agent sphere (the ASCII "orb" on the empty chat screen, behind the chat
transcript, and in the voice overlay) is a **hot-swappable component**. Built-in
skins ship with the app, an **Adaptive** skin recolors to match your theme, and
you can side-load your own skins from a small JSON file. This document is the
authoring reference.
> **See also** [`pet-spec.md`](./pet-spec.md) — appearance is two-level: the
> background visualization and floating pets are independent; skins apply only
+2 -2
View File
@@ -1,6 +1,6 @@
[versions]
appVersionName = "1.13.1"
appVersionCode = "50"
appVersionName = "1.13.2"
appVersionCode = "51"
agp = "9.3.2"
kotlin = "2.4.10"
compose-bom = "2026.08.00"
+18 -15
View File
@@ -6,10 +6,10 @@ inspection, and remote-access setup. The build output (`dist/index.js`) is
**committed to git** because the dashboard `<script src=...>` loads it verbatim
— operators never run the build.
The header's **Connect mobile app** action is intentionally independent of the
Relay service. It renders a tokenless setup QR containing only
The **Connect mobile app** action on Overview and Devices is intentionally
independent of the Hermes-Relay service. It renders a tokenless setup QR containing only
`{"dashboard_url":"<canonical dashboard base>"}` so Android can add and verify the
standard Dashboard/Gateway connection. Relay pairing remains a separate,
standard Dashboard/Gateway connection. Hermes-Relay pairing remains a separate,
explicit **Pair new device** flow.
## Requirements
@@ -63,7 +63,7 @@ All runtime dependencies come from two globals the dashboard shell injects:
|--------|----------|
| `window.__HERMES_PLUGIN_SDK__.React` | React namespace (we never bundle React) |
| `window.__HERMES_PLUGIN_SDK__.hooks` | `useState`, `useEffect`, `useCallback`, `useMemo` |
| `window.__HERMES_PLUGIN_SDK__.components` | shadcn primitives — `Tabs*`, `Card*`, `Table*`, `Button`, `Badge`, `Alert*`, `Switch`, `Label` |
| `window.__HERMES_PLUGIN_SDK__.components` | Nous primitives — `Tabs*`, `Dialog*`, `Card*`, `Button`, `Badge`, `ConfirmDialog`, `Input`, `Label`, `Toast` |
| `window.__HERMES_PLUGIN_SDK__.fetchJSON` | Session-token-authenticated JSON fetch |
| `window.__HERMES_PLUGINS__.register(name, Component)` | Registration hook |
@@ -94,7 +94,7 @@ where scan/read correctness requires them.
All proxied by `plugin_api.py` under `/api/plugins/hermes-relay/`:
- `GET /overview` — relay version, uptime, counters
- `GET /overview` — Hermes-Relay version, uptime, health, and compatibility counters
- `GET /sessions` — paired device list
- `GET /bridge-activity?limit=N` — ring buffer of recent bridge commands
- `GET /media?include_expired=true|false` — MediaRegistry snapshot
@@ -111,20 +111,23 @@ All proxied by `plugin_api.py` under `/api/plugins/hermes-relay/`:
A representative set when showcasing the plugin:
- Management tab with paired Android and desktop sessions
- Pairing dialog with QR code and endpoint controls
- Bridge Activity command stream
- Media Inspector token list
- Overview with service status, route summary, and recent Bridge activity
- Devices with standard Dashboard setup and paired Hermes-Relay clients
- Pairing dialog with QR-first layout and endpoint controls
- Activity with Bridge command stream and Media tokens diagnostic view
- Remote Access endpoint setup and probe results
- Settings with Home Channel, Agent Context, and maintenance categories
## Auto-refresh cadence
## Live refresh cadence
| Tab | Poll interval | Notes |
|-----|---------------|-------|
| Management | 10s | `/overview` + `/sessions` |
| Activity | 5s | `/bridge-activity` |
| Media | 15s | `/media`; TTL countdown ticks every 1s independently |
| Overview | 10s | `/overview`, `/sessions`, `/bridge-activity`, and remote-access status load independently |
| Devices | 10s | `/sessions` |
| Activity → Bridge activity | 5s | `/bridge-activity` |
| Activity → Media tokens | 15s | `/media`; TTL countdown ticks every 1s independently |
| Remote Access | 15s | `/remote-access/status`; endpoint probes run on demand |
| Settings | 15s | Home Channel and Agent Context refresh independently |
Toggle persists to `localStorage['hermes-relay-autorefresh']` (default: on).
When off, each tab surfaces a manual "Refresh" button.
@@ -132,8 +135,8 @@ When off, each tab surfaces a manual "Refresh" button.
## Notes
- Session revocation calls the dashboard backend's
`DELETE /sessions/{token_prefix}` proxy route and asks for operator
confirmation before sending the destructive request.
`DELETE /sessions/{token_prefix}` proxy route through the host
`ConfirmDialog` before sending the destructive request.
- Every tab handles loading / empty / error states. The error state shows the
backend's 502 detail verbatim so "relay unreachable" is debuggable without
opening devtools.
+7 -11
View File
File diff suppressed because one or more lines are too long
+505 -8
View File
@@ -31,8 +31,6 @@
.hermes-relay-plugin,
.hermes-relay-plugin * {
box-sizing: border-box;
letter-spacing: 0 !important;
text-transform: none !important;
}
.hermes-relay-plugin h1,
@@ -66,9 +64,9 @@
overflow-wrap: anywhere;
}
.hermes-relay-plugin input,
.hermes-relay-plugin select,
.hermes-relay-plugin textarea {
.hermes-relay-plugin textarea,
.hermes-relay-plugin input:not([class]) {
font: inherit;
color: inherit;
}
@@ -85,10 +83,6 @@
* colour explicitly via ``text-foreground`` / ``text-muted-foreground``, so they
* are unaffected by dropping the inherit.
*/
.hermes-relay-plugin button {
font: inherit;
}
.hermes-relay-plugin button {
display: inline-flex;
min-height: 2rem;
@@ -198,6 +192,10 @@
}
@media (min-width: 1024px) {
.hermes-relay-plugin .lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hermes-relay-plugin .lg\:grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
@@ -710,6 +708,505 @@
flex-wrap: wrap;
}
.hermes-relay-plugin .hr-switch {
position: relative;
display: inline-flex;
width: 2.25rem;
min-width: 2.25rem;
height: 1.25rem;
min-height: 1.25rem;
flex: 0 0 auto;
align-items: center;
padding: 0;
border: 1px solid var(--hr-border);
border-radius: 0;
background: var(--hr-bg);
transition: border-color 150ms ease, background 150ms ease;
}
.hermes-relay-plugin .hr-switch.checked {
border-color: color-mix(in srgb, var(--hr-success) 48%, transparent);
background: color-mix(in srgb, var(--hr-success) 18%, transparent);
}
.hermes-relay-plugin .hr-switch-thumb {
display: block;
width: 0.85rem;
height: 0.85rem;
transform: translateX(0.2rem);
background: color-mix(in srgb, var(--hr-muted) 70%, transparent);
transition: transform 150ms ease, background 150ms ease;
}
.hermes-relay-plugin .hr-switch.checked .hr-switch-thumb {
transform: translateX(1rem);
background: var(--hr-success);
}
.hermes-relay-plugin .hr-switch:focus-visible {
outline: 1px solid var(--hr-ring);
outline-offset: 2px;
}
/* Hermes-Relay information architecture ---------------------------------- */
.hermes-relay-plugin .hr-plugin-toolbar {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 1rem;
border-bottom: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-plugin-tablist {
min-width: 0;
flex: 1 1 auto;
overflow-x: auto;
border-bottom: 0;
}
.hermes-relay-plugin .hr-live-control {
display: flex;
flex: 0 0 auto;
align-items: center;
gap: 0.5rem;
min-height: 2.25rem;
padding-bottom: 0.35rem;
color: var(--hr-muted);
font-size: 0.75rem;
}
.hermes-relay-plugin .hr-tab-content {
min-width: 0;
}
.hermes-relay-plugin .hr-service-card {
overflow: hidden;
}
.hermes-relay-plugin .hr-service-header {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
}
.hermes-relay-plugin .hr-service-details {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0;
}
.hermes-relay-plugin .hr-service-details > div {
display: grid;
min-width: 9rem;
gap: 0.2rem;
padding-right: 1.5rem;
margin-right: 1.5rem;
border-right: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-service-details span {
color: var(--hr-muted);
font-size: 0.75rem;
}
.hermes-relay-plugin .hr-service-details strong {
font-family: var(--theme-font-mono, ui-monospace, monospace);
font-size: 0.875rem;
font-weight: 500;
}
.hermes-relay-plugin .hr-inline-error {
padding: 0 1rem 1rem;
}
.hermes-relay-plugin .hr-overview-grid,
.hermes-relay-plugin .hr-connection-choice-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
.hermes-relay-plugin .hr-overview-device {
display: grid;
gap: 0.5rem;
padding-top: 0.75rem;
border-top: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-device-list {
display: grid;
gap: 0.75rem;
}
.hermes-relay-plugin .hr-device-card {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.9rem;
border: 1px solid var(--hr-border);
background: color-mix(in srgb, var(--hr-surface-muted) 55%, transparent);
}
.hermes-relay-plugin .hr-device-card-compact {
padding: 0.75rem;
}
.hermes-relay-plugin .hr-device-main {
display: grid;
min-width: 0;
gap: 0.45rem;
}
.hermes-relay-plugin .hr-device-title-row,
.hermes-relay-plugin .hr-device-meta,
.hermes-relay-plugin .hr-grant-list,
.hermes-relay-plugin .hr-device-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.45rem;
}
.hermes-relay-plugin .hr-device-meta > span + span::before {
content: "·";
margin-right: 0.45rem;
color: var(--hr-border);
}
.hermes-relay-plugin .hr-device-actions {
flex: 0 0 auto;
justify-content: flex-end;
}
.hermes-relay-plugin .hr-status-dot {
width: 0.55rem;
height: 0.55rem;
flex: 0 0 auto;
border-radius: 999px;
}
.hermes-relay-plugin .hr-status-dot-success {
background: var(--hr-success);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--hr-success) 14%, transparent);
}
.hermes-relay-plugin .hr-empty-state {
display: grid;
place-items: center;
gap: 0.35rem;
min-height: 9rem;
padding: 1.5rem;
text-align: center;
border: 1px dashed var(--hr-border);
}
.hermes-relay-plugin .hr-activity-list {
display: grid;
}
.hermes-relay-plugin .hr-activity-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 0;
border-bottom: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-activity-row:first-child {
padding-top: 0;
}
.hermes-relay-plugin .hr-activity-row:last-child {
padding-bottom: 0;
border-bottom: 0;
}
.hermes-relay-plugin .hr-activity-method {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hermes-relay-plugin .hr-activity-tablist {
width: fit-content;
}
/* Settings follows the upstream Config page's rail + content pattern. */
.hermes-relay-plugin .hr-settings-layout {
display: grid;
grid-template-columns: 14rem minmax(0, 1fr);
gap: 1rem;
align-items: start;
}
.hermes-relay-plugin .hr-settings-nav {
display: grid;
gap: 1px;
padding: 0.5rem;
border: 1px solid var(--hr-border);
background: color-mix(in srgb, var(--hr-surface-muted) 55%, transparent);
}
.hermes-relay-plugin .hr-settings-nav-label {
padding: 0.4rem 0.55rem 0.6rem;
color: var(--hr-muted);
font-family: var(--theme-font-display, var(--theme-font-sans));
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.hermes-relay-plugin .hr-settings-nav-item {
width: 100%;
justify-content: flex-start;
padding: 0.55rem 0.65rem;
border: 0;
border-radius: 0;
background: transparent;
color: var(--hr-muted);
font-family: var(--theme-font-sans);
font-size: 0.8rem;
text-align: left;
}
.hermes-relay-plugin .hr-settings-nav-item:hover,
.hermes-relay-plugin .hr-settings-nav-item.active {
background: var(--hr-surface-muted);
color: var(--hr-text);
}
.hermes-relay-plugin .hr-settings-nav-item.active {
box-shadow: inset 2px 0 0 var(--hr-text);
}
.hermes-relay-plugin .hr-settings-content {
min-width: 0;
}
.hermes-relay-plugin .hr-audit-details {
border: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-audit-details > summary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem;
cursor: pointer;
list-style: none;
}
.hermes-relay-plugin .hr-audit-details > summary::-webkit-details-marker {
display: none;
}
.hermes-relay-plugin .hr-audit-blocks,
.hermes-relay-plugin .hr-audit-empty {
padding: 0 0.75rem 0.75rem;
}
/* Pairing uses the host Dialog primitive; these rules only compose its body. */
.hermes-relay-plugin.hr-pair-dialog {
width: min(62rem, calc(100vw - 2rem));
max-width: 62rem;
max-height: min(90vh, 52rem);
overflow-x: hidden;
overflow-y: auto;
}
.hermes-relay-plugin.hr-pair-dialog [data-slot="dialog-header"] {
padding-right: 3rem;
}
.hermes-relay-plugin .hr-pair-body {
display: grid;
grid-template-columns: minmax(18rem, 0.9fr) minmax(22rem, 1.1fr);
gap: 1rem;
padding: 1rem;
}
.hermes-relay-plugin .hr-pair-qr-column,
.hermes-relay-plugin .hr-pair-options-column {
display: grid;
align-content: start;
gap: 0.75rem;
min-width: 0;
}
.hermes-relay-plugin .hr-pair-loading {
display: grid;
min-height: 20rem;
place-items: center;
border: 1px dashed var(--hr-border);
}
.hermes-relay-plugin .hr-pair-code-row,
.hermes-relay-plugin .hr-pair-connection-header,
.hermes-relay-plugin .hr-endpoint-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
}
.hermes-relay-plugin .hr-pair-panel,
.hermes-relay-plugin .hr-pair-advanced {
display: grid;
gap: 0.75rem;
padding: 0.85rem;
border: 1px solid var(--hr-border);
background: color-mix(in srgb, var(--hr-surface-muted) 50%, transparent);
}
.hermes-relay-plugin .hr-pair-panel-title,
.hermes-relay-plugin .hr-pair-advanced > summary {
font-family: var(--theme-font-display, var(--theme-font-sans));
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.hermes-relay-plugin .hr-endpoint-list {
display: grid;
border-top: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-endpoint-row {
padding: 0.65rem 0;
border-bottom: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-endpoint-row:last-child {
padding-bottom: 0;
border-bottom: 0;
}
.hermes-relay-plugin .hr-endpoint-address {
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hermes-relay-plugin .hr-pair-advanced {
padding: 0;
}
.hermes-relay-plugin .hr-pair-advanced > summary {
padding: 0.85rem;
cursor: pointer;
list-style: none;
}
.hermes-relay-plugin .hr-pair-advanced > summary::-webkit-details-marker {
display: none;
}
.hermes-relay-plugin .hr-pair-advanced-content {
padding: 0 0.85rem 0.85rem;
border-top: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-pair-checkbox {
display: flex;
align-items: center;
gap: 0.5rem;
min-height: 2.25rem;
}
@media (max-width: 860px) {
.hermes-relay-plugin .hr-overview-grid,
.hermes-relay-plugin .hr-connection-choice-grid,
.hermes-relay-plugin .hr-settings-layout,
.hermes-relay-plugin .hr-pair-body {
grid-template-columns: 1fr;
}
.hermes-relay-plugin .hr-settings-nav {
display: flex;
overflow-x: auto;
}
.hermes-relay-plugin .hr-settings-nav-label {
display: none;
}
.hermes-relay-plugin .hr-settings-nav-item {
width: auto;
flex: 0 0 auto;
}
.hermes-relay-plugin .hr-settings-nav-item.active {
box-shadow: inset 0 -2px 0 var(--hr-text);
}
}
@media (max-width: 640px) {
.hermes-relay-plugin .hr-plugin-toolbar {
align-items: stretch;
flex-direction: column;
gap: 0.35rem;
}
.hermes-relay-plugin .hr-live-control {
align-self: flex-end;
padding-bottom: 0;
}
.hermes-relay-plugin .hr-service-header,
.hermes-relay-plugin .hr-device-card {
align-items: stretch;
flex-direction: column;
}
.hermes-relay-plugin .hr-service-details {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem;
}
.hermes-relay-plugin .hr-service-details > div {
min-width: 0;
padding: 0;
margin: 0;
border-right: 0;
}
.hermes-relay-plugin .hr-device-actions {
justify-content: flex-start;
}
.hermes-relay-plugin.hr-pair-dialog {
width: calc(100vw - 1rem);
max-height: calc(100vh - 1rem);
}
.hermes-relay-plugin .hr-pair-body {
padding: 0.75rem;
}
.hermes-relay-plugin .hr-pair-connection-header {
align-items: stretch;
flex-direction: column;
}
.hermes-relay-plugin .hr-pair-connection-header select {
width: 100%;
}
}
.hermes-relay-plugin .fixed {
position: fixed;
}
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "hermes-relay",
"label": "Relay",
"description": "Paired devices, bridge activity, media inspection, and remote access for hermes-relay",
"label": "Hermes-Relay",
"description": "Paired devices, Bridge activity, media tokens, and remote access for Hermes-Relay",
"icon": "Activity",
"version": "1.10.0",
"tab": {
@@ -122,9 +122,9 @@ export default function MobileConnectDialog({ open, onClose }) {
Chat, Manage, sessions, and standard voice.
</p>
<p className="text-xs text-muted-foreground">
This QR does not pair Relay or enable Terminal, Bridge, device tools, or Relay
sessions. Use <strong>Pair new device</strong> separately when a reachable Relay
server is available.
This QR does not pair Hermes-Relay or enable Terminal, Bridge, device tools, or
Hermes-Relay sessions. Use <strong>Pair new device</strong> separately when a
reachable Hermes-Relay service is available.
</p>
</div>
+195 -209
View File
@@ -6,7 +6,16 @@ import QRCode from "qrcode";
import { mintPairingWithMode } from "../lib/api.js";
import { Button, Badge } from "../lib/ui-shims.jsx";
const { Input, Label } = SDK.components;
const {
Input,
Label,
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} = SDK.components;
// localStorage keys — per-browser, not per-user. Sensible defaults on first
// open; stick with whatever the operator last used.
@@ -176,7 +185,15 @@ export default function PairDialog({ open, onClose }) {
}).catch(() => { /* canvas failure non-fatal */ });
}, [state.status, state.data]);
const updateSetting = useCallback((patch) => {
useEffect(() => {
if (open) return;
setState({ status: "idle" });
setCopyStatus("");
setAdvancedOpen(false);
setProxyConfirmed(false);
}, [open]);
const updateSetting = useCallback((patch, remint = true) => {
setSettings((prev) => {
const next = { ...prev, ...patch };
saveSettings(next);
@@ -189,7 +206,7 @@ export default function PairDialog({ open, onClose }) {
}
// Re-mint with the new settings. Debouncing isn't worth it — the
// dropdowns only fire on user action, not typing.
setState({ status: "idle" });
if (remint) setState({ status: "idle" });
}, []);
const regenerate = useCallback(() => {
@@ -224,236 +241,205 @@ export default function PairDialog({ open, onClose }) {
const blockForProxyConsent = hostLooksProxyFronted && !proxyConfirmed;
return (
<div
className="hermes-relay-plugin hr-modal-backdrop"
role="dialog"
aria-modal="true"
aria-labelledby="hr-pair-dialog-title"
>
<div className="hr-modal-card">
<div className="hr-modal-header">
<div>
<h2 id="hr-pair-dialog-title" className="hr-modal-title">Pair new device</h2>
<p className="text-sm text-muted-foreground mt-1">
Scan with Hermes-Relay Android, or copy the invite for Desktop CLI.
</p>
<Dialog open={open} onOpenChange={(next) => { if (!next) onClose(); }}>
<DialogContent className="hermes-relay-plugin hr-pair-dialog">
<DialogHeader>
<div className="flex flex-wrap items-center gap-2">
<DialogTitle>Pair new device</DialogTitle>
<Badge variant="outline" className="text-xs">Hermes-Relay Plugin</Badge>
</div>
<Button variant="ghost" size="sm" className="hr-modal-close" onClick={onClose}>
Close
</Button>
</div>
<div className="hr-modal-body space-y-3">
{/* Mode + prefer controls — always visible, these are the
primary inputs now. Multi-endpoint candidates get derived
server-side from Tailscale + pinned Public URL. */}
<div className="space-y-2">
<div className="space-y-1">
<Label htmlFor="pair-mode">Mode</Label>
<select
id="pair-mode"
className="h-9 w-full rounded-md border border-border bg-background px-2 text-sm"
value={settings.mode}
onChange={(e) => updateSetting({ mode: e.target.value })}
>
{MODES.map((m) => (
<option key={m.value} value={m.value}>{m.label}</option>
<DialogDescription>
Scan with Hermes-Relay Android or copy the invite for Desktop CLI.
</DialogDescription>
</DialogHeader>
<div className="hr-pair-body">
<section className="hr-pair-qr-column" aria-label="Hermes-Relay pairing code">
{blockForProxyConsent ? (
<div className="rounded-md border border-amber-500/60 bg-amber-500/15 p-3 text-sm space-y-2">
<div className="font-medium">Proxy-fronted host detected</div>
<p className="text-xs">
<span className="font-mono">{settings.host}</span> appears to require browser
authentication that Hermes-Relay Android cannot present to the API route.
</p>
<div className="flex flex-wrap gap-2">
<Button size="sm" onClick={confirmProxyAndMint}>Mint anyway</Button>
<Button
size="sm"
variant="outline"
onClick={() => updateSetting({ host: "", port: 8642, tls: false })}
>
Clear override
</Button>
</div>
</div>
) : state.status === "loading" ? (
<div className="hr-pair-loading text-sm text-muted-foreground">Minting a secure code…</div>
) : state.status === "error" ? (
<div className="rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive">
<div className="font-medium mb-1">Minting failed</div>
<div className="break-words">{state.error}</div>
<Button className="mt-2" size="sm" variant="outline" onClick={regenerate}>Retry</Button>
</div>
) : state.status === "ok" ? (
<>
<div className="hr-qr-frame">
<canvas ref={canvasRef} className="block" aria-label="Hermes-Relay pairing QR code" />
</div>
<div className="hr-pair-code-row">
<div>
<div className="text-xs uppercase tracking-wider text-muted-foreground">Pairing code</div>
<div className="font-mono text-2xl tracking-widest">{state.data.code}</div>
</div>
<div className="text-right">
<div className="text-xs uppercase tracking-wider text-muted-foreground">Expires in</div>
<Badge variant={countdown === "expired" ? "destructive" : "outline"}>
{countdown || "—"}
</Badge>
</div>
</div>
{state.data.pairing_url ? (
<div className="space-y-2">
<Button className="w-full" size="sm" variant="outline" onClick={copyInvite}>
Copy invite
</Button>
{copyStatus ? <div className="text-center text-xs text-muted-foreground">{copyStatus}</div> : null}
</div>
) : null}
</>
) : null}
</section>
<section className="hr-pair-options-column">
<div className="hr-pair-panel">
<div className="hr-pair-panel-title">What this adds</div>
<div className="hr-grant-list">
{['Terminal', 'Bridge', 'Media', 'Voice'].map((label) => (
<Badge key={label} variant="outline" className="text-xs">{label}</Badge>
))}
</select>
</div>
<p className="text-xs text-muted-foreground">
<strong>Auto</strong> embeds every reachable endpoint so the phone
switches as networks change. Configure Tailscale + Public URL on
the <em>Remote Access</em> tab.
Extends an existing Hermes Dashboard connection with Hermes-Relay capabilities.
</p>
</div>
<div className="space-y-1">
<Label htmlFor="pair-prefer">Prefer role</Label>
<select
id="pair-prefer"
className="h-9 w-full rounded-md border border-border bg-background px-2 text-sm"
value={settings.prefer}
onChange={(e) => updateSetting({ prefer: e.target.value })}
>
{PREFER_ROLES.map((p) => (
<option key={p.value} value={p.value}>{p.label}</option>
))}
</select>
</div>
</div>
{blockForProxyConsent && (
<div className="rounded-md border border-amber-500/60 bg-amber-500/15 p-3 text-sm space-y-2">
<div className="font-medium">Proxy-fronted host detected — confirm before minting</div>
<div className="text-xs">
<span className="font-mono">{settings.host}</span> looks like a reverse-proxy
or forward-auth gateway (Authelia, Cloudflare Access, Traefik, …). The relay
WSS will pair fine, but the phone's API calls will likely return 401/403
because it has no way to present the gateway's session cookie. Result: the
paired device shows up in Management but the app silently drops the config.
</div>
<div className="text-xs">
Prefer: leave this field blank (use <code className="font-mono">mode=auto</code>)
or switch to a non-gated endpoint (Tailscale Serve / direct LAN). See
<em>docs/remote-access.md</em> &rarr; &ldquo;Forward-auth gateways&rdquo;.
</div>
<div className="flex gap-2 pt-1">
<Button size="sm" onClick={confirmProxyAndMint}>
Mint anyway
</Button>
<Button
size="sm"
variant="outline"
onClick={() => updateSetting({ host: "", port: 8642, tls: false })}
>
Clear override
</Button>
</div>
</div>
)}
{!blockForProxyConsent && state.status === "loading" && (
<div className="text-sm text-muted-foreground">Minting code…</div>
)}
{!blockForProxyConsent && state.status === "error" && (
<div className="rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive">
<div className="font-medium mb-1">Minting failed</div>
<div className="break-words">{state.error}</div>
<div className="mt-2 flex gap-2">
<Button size="sm" variant="outline" onClick={regenerate}>Retry</Button>
</div>
</div>
)}
{!blockForProxyConsent && state.status === "ok" && (
<>
<div className="hr-qr-frame">
<canvas ref={canvasRef} className="block" />
</div>
<div className="flex items-center justify-between gap-2">
<div className="hr-pair-panel">
<div className="hr-pair-connection-header">
<div>
<div className="text-xs uppercase tracking-wider text-muted-foreground">Code</div>
<div className="font-mono text-2xl tracking-widest">{state.data.code}</div>
</div>
<div className="text-right">
<div className="text-xs uppercase tracking-wider text-muted-foreground">Expires in</div>
<Badge variant={countdown === "expired" ? "destructive" : "outline"}>
{countdown || "—"}
</Badge>
<div className="hr-pair-panel-title">Connection</div>
<div className="text-xs text-muted-foreground">Best available route</div>
</div>
<select
id="pair-mode"
aria-label="Connection mode"
className="h-9 rounded-md border border-border bg-background px-2 text-sm"
value={settings.mode}
onChange={(event) => updateSetting({ mode: event.target.value })}
>
{MODES.map((mode) => (
<option key={mode.value} value={mode.value}>{mode.label}</option>
))}
</select>
</div>
{state.data.pairing_url ? (
<div className="rounded-md border border-border bg-muted/20 px-3 py-2 text-xs space-y-2">
<div className="uppercase tracking-wider text-muted-foreground">
Copy/paste invite
</div>
<div className="font-mono break-all">{state.data.pairing_url}</div>
<div className="flex items-center gap-2">
<Button size="sm" variant="outline" onClick={copyInvite}>
Copy invite URL
</Button>
{copyStatus ? (
<span className="text-muted-foreground">{copyStatus}</span>
) : null}
</div>
</div>
) : null}
{/* Compact endpoint receipt — full preview + probes live on
the Remote Access tab. */}
{endpoints && endpoints.length > 0 ? (
<div className="rounded-md border border-border bg-muted/20 px-3 py-2 text-xs space-y-1">
<div className="uppercase tracking-wider text-muted-foreground">
Endpoints in this QR ({endpoints.length})
</div>
{endpoints.map((ep) => (
<div key={`${ep.role}-${ep.priority}`} className="flex items-center gap-2">
<Badge variant="outline" className="text-xs capitalize">{ep.role}</Badge>
<span className="font-mono">
{ep.api.host}{ep.api.port ? `:${ep.api.port}` : ""}
<div className="hr-endpoint-list">
{endpoints.map((endpoint) => (
<div key={`${endpoint.role}-${endpoint.priority}`} className="hr-endpoint-row">
<Badge variant="outline" className="text-xs capitalize">{endpoint.role}</Badge>
<span className="font-mono text-xs hr-endpoint-address">
{endpoint.api.host}{endpoint.api.port ? `:${endpoint.api.port}` : ""}
</span>
<span className="text-muted-foreground ml-auto">p{ep.priority}</span>
<span className="text-xs text-muted-foreground">p{endpoint.priority}</span>
</div>
))}
</div>
) : null}
<div className="flex gap-2 pt-1">
<Button size="sm" variant="outline" onClick={regenerate}>
New code
</Button>
<Button size="sm" onClick={onClose}>Done</Button>
</div>
</>
)}
) : (
<div className="text-xs text-muted-foreground">Automatic route selection will use server configuration.</div>
)}
</div>
{/* Advanced — API server override. Most operators never need
this; it's kept for edge cases. Warn when the host looks
proxy-fronted (Authelia etc.) because the phone has no way
to present that auth material. */}
<div className="border-t border-border pt-3">
<button
type="button"
onClick={() => setAdvancedOpen((v) => !v)}
className="text-xs text-muted-foreground hover:text-foreground transition-colors"
>
{advancedOpen ? "▾ Hide advanced" : "▸ Advanced · API-server override"}
</button>
{advancedOpen && (
<div className="mt-3 space-y-3">
<p className="text-xs text-muted-foreground">
Override the API-server host embedded in the QR (defaults to the
relay's configured API host). Relay URL is auto-derived server-side —
edit Tailscale / Public URL on the <em>Remote Access</em> tab instead.
</p>
{proxyWarning ? (
<div className="rounded-md border border-amber-500/50 bg-amber-500/10 p-2 text-xs">
<strong>Heads-up:</strong> <span className="font-mono">{settings.host}</span> looks
like a reverse-proxy / forward-auth host. If it's fronted by
Authelia, Cloudflare Access, or similar, the phone will fail
to authenticate against the API even though the relay WSS
pairs fine. Leave this blank and let <code className="font-mono">mode=auto</code> pick.
</div>
) : null}
<div className="space-y-1">
<Label htmlFor="pair-host">API host (optional)</Label>
<Input
id="pair-host"
value={settings.host}
placeholder="leave blank to use server config"
onChange={(e) => updateSetting({ host: e.target.value })}
/>
</div>
<div className="grid grid-cols-2 gap-2">
<details className="hr-pair-advanced" open={advancedOpen}>
<summary onClick={(event) => { event.preventDefault(); setAdvancedOpen((value) => !value); }}>
Advanced connection options
</summary>
{advancedOpen ? (
<div className="hr-pair-advanced-content space-y-3">
<div className="space-y-1">
<Label htmlFor="pair-port">API port</Label>
<Label htmlFor="pair-prefer">Prefer role</Label>
<select
id="pair-prefer"
className="h-9 w-full rounded-md border border-border bg-background px-2 text-sm"
value={settings.prefer}
onChange={(event) => updateSetting({ prefer: event.target.value })}
>
{PREFER_ROLES.map((role) => (
<option key={role.value} value={role.value}>{role.label}</option>
))}
</select>
</div>
<div className="space-y-1">
<Label htmlFor="pair-host">API host override</Label>
<Input
id="pair-port"
type="number"
min="1"
max="65535"
value={settings.port}
onChange={(e) => updateSetting({ port: parseInt(e.target.value, 10) || 8642 })}
id="pair-host"
value={settings.host}
placeholder="Use server configuration"
onChange={(event) => updateSetting({ host: event.target.value }, false)}
/>
</div>
<div className="space-y-1">
<Label htmlFor="pair-tls">Scheme</Label>
<div className="flex items-center gap-2 pt-1">
<input
id="pair-tls"
type="checkbox"
className="h-4 w-4"
checked={!!settings.tls}
onChange={(e) => updateSetting({ tls: e.target.checked })}
<div className="grid grid-cols-2 gap-2">
<div className="space-y-1">
<Label htmlFor="pair-port">API port</Label>
<Input
id="pair-port"
type="number"
min="1"
max="65535"
value={settings.port}
onChange={(event) => updateSetting({ port: parseInt(event.target.value, 10) || 8642 }, false)}
/>
<Label htmlFor="pair-tls" className="text-sm font-normal">
</div>
<div className="space-y-1">
<Label htmlFor="pair-tls">Scheme</Label>
<label className="hr-pair-checkbox text-sm" htmlFor="pair-tls">
<input
id="pair-tls"
type="checkbox"
className="h-4 w-4"
checked={!!settings.tls}
onChange={(event) => updateSetting({ tls: event.target.checked }, false)}
/>
https://
</Label>
</label>
</div>
</div>
{proxyWarning ? (
<div className="rounded-md border border-amber-500/50 bg-amber-500/10 p-2 text-xs">
This host appears proxy-fronted and may reject API requests from Hermes-Relay Android.
</div>
) : null}
<div className="flex flex-wrap gap-2">
<Button size="sm" onClick={regenerate}>Apply and mint</Button>
<Button
size="sm"
variant="ghost"
onClick={() => updateSetting({ host: "", port: 8642, tls: false })}
>
Clear override
</Button>
</div>
</div>
<Button size="sm" variant="ghost" onClick={() => updateSetting({ host: "", port: 8642, tls: false })}>
Clear override
</Button>
</div>
)}
</div>
) : null}
</details>
</section>
</div>
</div>
</div>
<DialogFooter>
<Button size="sm" variant="outline" onClick={regenerate} disabled={state.status === "loading"}>
New code
</Button>
<Button size="sm" onClick={onClose}>Done</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
}
@@ -30,10 +30,10 @@ const POLL_MS = 15000;
// (label, tone) for each derived state. Tone strings are the host Badge
// contract; see web/node_modules/@nous-research/ui/.../badge.tsx.
const STATES = {
loading: { label: "Relay · …", tone: "secondary" },
offline: { label: "Relay · offline", tone: "warning" },
unpaired: { label: "Relay · unpaired", tone: "secondary" },
connected: { label: "Relay · connected", tone: "success" },
loading: { label: "Hermes-Relay · …", tone: "secondary" },
offline: { label: "Hermes-Relay · offline", tone: "warning" },
unpaired: { label: "Hermes-Relay · unpaired", tone: "secondary" },
connected: { label: "Hermes-Relay · connected", tone: "success" },
};
function deriveState(overview) {
@@ -73,7 +73,7 @@ export default function RelayStatusSlot() {
<Badge
tone={tone}
className="whitespace-nowrap text-xs"
title="hermes-relay status"
title="Hermes-Relay status"
>
{label}
</Badge>
+58 -64
View File
@@ -2,25 +2,28 @@ const SDK = window.__HERMES_PLUGIN_SDK__;
const { React } = SDK;
const { useState, useEffect, useCallback } = SDK.hooks;
import RelayManagement from "./tabs/RelayManagement.jsx";
import BridgeActivity from "./tabs/BridgeActivity.jsx";
import MediaInspector from "./tabs/MediaInspector.jsx";
import RelayDevices, {
RelayOverview,
RelaySettings,
} from "./tabs/RelayManagement.jsx";
import ActivityHub from "./tabs/ActivityHub.jsx";
import RemoteAccess from "./tabs/RemoteAccess.jsx";
import GitState from "./tabs/GitState.jsx";
import RelayStatusSlot from "./components/RelayStatusSlot.jsx";
import MobileConnectDialog from "./components/MobileConnectDialog.jsx";
import { Button, Switch } from "./lib/ui-shims.jsx";
import { Switch } from "./lib/ui-shims.jsx";
const { Label } = SDK.components;
const { Label, Tabs, TabsList, TabsTrigger } = SDK.components;
const AUTO_REFRESH_KEY = "hermes-relay-autorefresh";
const TABS = [
{ key: "management", label: "Management" },
{ key: "overview", label: "Overview" },
{ key: "devices", label: "Devices" },
{ key: "activity", label: "Activity" },
{ key: "media", label: "Media" },
{ key: "remote", label: "Remote Access" },
{ key: "git", label: "Git" },
{ key: "settings", label: "Settings" },
];
function readAutoRefresh() {
@@ -41,20 +44,7 @@ function writeAutoRefresh(value) {
}
}
function TabButton({ active, onClick, children }) {
const base =
"px-4 py-2 text-sm font-medium border-b-2 transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-ring";
const on = "border-foreground text-foreground";
const off = "border-transparent text-muted-foreground hover:text-foreground";
return (
<button type="button" onClick={onClick} className={`${base} ${active ? on : off}`}>
{children}
</button>
);
}
function RelayPluginRoot() {
const [tab, setTab] = useState("management");
const [mobileConnectOpen, setMobileConnectOpen] = useState(false);
const [autoRefresh, setAutoRefreshState] = useState(readAutoRefresh);
@@ -72,51 +62,55 @@ function RelayPluginRoot() {
const closeMobileConnect = useCallback(() => setMobileConnectOpen(false), []);
return (
<div className="hermes-relay-plugin space-y-4 p-4">
<div className="flex flex-wrap items-center justify-between gap-3">
<div>
<h1 className="text-2xl font-semibold">Relay</h1>
<p className="text-sm text-muted-foreground">
Connect clients and manage Relay sessions, activity, media, and remote access.
</p>
</div>
<div className="flex flex-wrap items-center gap-3">
<Button
size="sm"
onClick={openMobileConnect}
>
Connect mobile app
</Button>
<div className="flex items-center gap-2">
<Switch
id="auto-refresh"
checked={autoRefresh}
onCheckedChange={setAutoRefresh}
/>
<Label htmlFor="auto-refresh">Auto-refresh</Label>
</div>
</div>
</div>
<div className="hermes-relay-plugin p-4">
<Tabs defaultValue="overview" className="hr-plugin-tabs">
{(tab, setTab) => (
<>
<div className="hr-plugin-toolbar">
<TabsList className="hr-plugin-tablist">
{TABS.map((item) => (
<TabsTrigger
key={item.key}
active={tab === item.key}
value={item.key}
onClick={() => setTab(item.key)}
>
{item.label}
</TabsTrigger>
))}
</TabsList>
<div className="hr-live-control">
<Switch
id="auto-refresh"
checked={autoRefresh}
onCheckedChange={setAutoRefresh}
/>
<Label htmlFor="auto-refresh">Live</Label>
</div>
</div>
<div role="tablist" className="flex items-center gap-1 border-b border-border">
{TABS.map((t) => (
<TabButton
key={t.key}
active={tab === t.key}
onClick={() => setTab(t.key)}
>
{t.label}
</TabButton>
))}
</div>
<div className="mt-4">
{tab === "management" && <RelayManagement autoRefresh={autoRefresh} />}
{tab === "activity" && <BridgeActivity autoRefresh={autoRefresh} />}
{tab === "media" && <MediaInspector autoRefresh={autoRefresh} />}
{tab === "remote" && <RemoteAccess autoRefresh={autoRefresh} />}
{tab === "git" && <GitState autoRefresh={autoRefresh} />}
</div>
<div className="hr-tab-content">
{tab === "overview" && (
<RelayOverview
autoRefresh={autoRefresh}
onConnectMobile={openMobileConnect}
onNavigate={setTab}
/>
)}
{tab === "devices" && (
<RelayDevices
autoRefresh={autoRefresh}
onConnectMobile={openMobileConnect}
/>
)}
{tab === "activity" && <ActivityHub autoRefresh={autoRefresh} />}
{tab === "remote" && <RemoteAccess autoRefresh={autoRefresh} />}
{tab === "git" && <GitState autoRefresh={autoRefresh} />}
{tab === "settings" && <RelaySettings autoRefresh={autoRefresh} />}
</div>
</>
)}
</Tabs>
<MobileConnectDialog
open={mobileConnectOpen}
onClose={closeMobileConnect}
+11 -7
View File
@@ -122,15 +122,19 @@ export const CardDescription = C.CardDescription || (({ children, className = ""
<p className={`text-sm text-muted-foreground ${className}`}>{children}</p>
));
export const Switch = C.Switch || (({ checked, onCheckedChange, id, disabled }) => (
<input
export const Switch = C.Switch || (({ checked, onCheckedChange, id, disabled, ...rest }) => (
<button
id={id}
type="checkbox"
checked={!!checked}
type="button"
role="switch"
aria-checked={!!checked}
disabled={!!disabled}
onChange={(e) => onCheckedChange && onCheckedChange(e.target.checked)}
className="h-4 w-4"
/>
className={`hr-switch ${checked ? "checked" : ""}`}
onClick={() => onCheckedChange && onCheckedChange(!checked)}
{...rest}
>
<span className="hr-switch-thumb" aria-hidden="true" />
</button>
));
export const Table = C.Table || (({ children, className = "" }) => (
+505 -8
View File
@@ -31,8 +31,6 @@
.hermes-relay-plugin,
.hermes-relay-plugin * {
box-sizing: border-box;
letter-spacing: 0 !important;
text-transform: none !important;
}
.hermes-relay-plugin h1,
@@ -66,9 +64,9 @@
overflow-wrap: anywhere;
}
.hermes-relay-plugin input,
.hermes-relay-plugin select,
.hermes-relay-plugin textarea {
.hermes-relay-plugin textarea,
.hermes-relay-plugin input:not([class]) {
font: inherit;
color: inherit;
}
@@ -85,10 +83,6 @@
* colour explicitly via ``text-foreground`` / ``text-muted-foreground``, so they
* are unaffected by dropping the inherit.
*/
.hermes-relay-plugin button {
font: inherit;
}
.hermes-relay-plugin button {
display: inline-flex;
min-height: 2rem;
@@ -198,6 +192,10 @@
}
@media (min-width: 1024px) {
.hermes-relay-plugin .lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hermes-relay-plugin .lg\:grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
@@ -710,6 +708,505 @@
flex-wrap: wrap;
}
.hermes-relay-plugin .hr-switch {
position: relative;
display: inline-flex;
width: 2.25rem;
min-width: 2.25rem;
height: 1.25rem;
min-height: 1.25rem;
flex: 0 0 auto;
align-items: center;
padding: 0;
border: 1px solid var(--hr-border);
border-radius: 0;
background: var(--hr-bg);
transition: border-color 150ms ease, background 150ms ease;
}
.hermes-relay-plugin .hr-switch.checked {
border-color: color-mix(in srgb, var(--hr-success) 48%, transparent);
background: color-mix(in srgb, var(--hr-success) 18%, transparent);
}
.hermes-relay-plugin .hr-switch-thumb {
display: block;
width: 0.85rem;
height: 0.85rem;
transform: translateX(0.2rem);
background: color-mix(in srgb, var(--hr-muted) 70%, transparent);
transition: transform 150ms ease, background 150ms ease;
}
.hermes-relay-plugin .hr-switch.checked .hr-switch-thumb {
transform: translateX(1rem);
background: var(--hr-success);
}
.hermes-relay-plugin .hr-switch:focus-visible {
outline: 1px solid var(--hr-ring);
outline-offset: 2px;
}
/* Hermes-Relay information architecture ---------------------------------- */
.hermes-relay-plugin .hr-plugin-toolbar {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 1rem;
border-bottom: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-plugin-tablist {
min-width: 0;
flex: 1 1 auto;
overflow-x: auto;
border-bottom: 0;
}
.hermes-relay-plugin .hr-live-control {
display: flex;
flex: 0 0 auto;
align-items: center;
gap: 0.5rem;
min-height: 2.25rem;
padding-bottom: 0.35rem;
color: var(--hr-muted);
font-size: 0.75rem;
}
.hermes-relay-plugin .hr-tab-content {
min-width: 0;
}
.hermes-relay-plugin .hr-service-card {
overflow: hidden;
}
.hermes-relay-plugin .hr-service-header {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
}
.hermes-relay-plugin .hr-service-details {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0;
}
.hermes-relay-plugin .hr-service-details > div {
display: grid;
min-width: 9rem;
gap: 0.2rem;
padding-right: 1.5rem;
margin-right: 1.5rem;
border-right: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-service-details span {
color: var(--hr-muted);
font-size: 0.75rem;
}
.hermes-relay-plugin .hr-service-details strong {
font-family: var(--theme-font-mono, ui-monospace, monospace);
font-size: 0.875rem;
font-weight: 500;
}
.hermes-relay-plugin .hr-inline-error {
padding: 0 1rem 1rem;
}
.hermes-relay-plugin .hr-overview-grid,
.hermes-relay-plugin .hr-connection-choice-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
.hermes-relay-plugin .hr-overview-device {
display: grid;
gap: 0.5rem;
padding-top: 0.75rem;
border-top: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-device-list {
display: grid;
gap: 0.75rem;
}
.hermes-relay-plugin .hr-device-card {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.9rem;
border: 1px solid var(--hr-border);
background: color-mix(in srgb, var(--hr-surface-muted) 55%, transparent);
}
.hermes-relay-plugin .hr-device-card-compact {
padding: 0.75rem;
}
.hermes-relay-plugin .hr-device-main {
display: grid;
min-width: 0;
gap: 0.45rem;
}
.hermes-relay-plugin .hr-device-title-row,
.hermes-relay-plugin .hr-device-meta,
.hermes-relay-plugin .hr-grant-list,
.hermes-relay-plugin .hr-device-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.45rem;
}
.hermes-relay-plugin .hr-device-meta > span + span::before {
content: "·";
margin-right: 0.45rem;
color: var(--hr-border);
}
.hermes-relay-plugin .hr-device-actions {
flex: 0 0 auto;
justify-content: flex-end;
}
.hermes-relay-plugin .hr-status-dot {
width: 0.55rem;
height: 0.55rem;
flex: 0 0 auto;
border-radius: 999px;
}
.hermes-relay-plugin .hr-status-dot-success {
background: var(--hr-success);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--hr-success) 14%, transparent);
}
.hermes-relay-plugin .hr-empty-state {
display: grid;
place-items: center;
gap: 0.35rem;
min-height: 9rem;
padding: 1.5rem;
text-align: center;
border: 1px dashed var(--hr-border);
}
.hermes-relay-plugin .hr-activity-list {
display: grid;
}
.hermes-relay-plugin .hr-activity-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 0;
border-bottom: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-activity-row:first-child {
padding-top: 0;
}
.hermes-relay-plugin .hr-activity-row:last-child {
padding-bottom: 0;
border-bottom: 0;
}
.hermes-relay-plugin .hr-activity-method {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hermes-relay-plugin .hr-activity-tablist {
width: fit-content;
}
/* Settings follows the upstream Config page's rail + content pattern. */
.hermes-relay-plugin .hr-settings-layout {
display: grid;
grid-template-columns: 14rem minmax(0, 1fr);
gap: 1rem;
align-items: start;
}
.hermes-relay-plugin .hr-settings-nav {
display: grid;
gap: 1px;
padding: 0.5rem;
border: 1px solid var(--hr-border);
background: color-mix(in srgb, var(--hr-surface-muted) 55%, transparent);
}
.hermes-relay-plugin .hr-settings-nav-label {
padding: 0.4rem 0.55rem 0.6rem;
color: var(--hr-muted);
font-family: var(--theme-font-display, var(--theme-font-sans));
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.hermes-relay-plugin .hr-settings-nav-item {
width: 100%;
justify-content: flex-start;
padding: 0.55rem 0.65rem;
border: 0;
border-radius: 0;
background: transparent;
color: var(--hr-muted);
font-family: var(--theme-font-sans);
font-size: 0.8rem;
text-align: left;
}
.hermes-relay-plugin .hr-settings-nav-item:hover,
.hermes-relay-plugin .hr-settings-nav-item.active {
background: var(--hr-surface-muted);
color: var(--hr-text);
}
.hermes-relay-plugin .hr-settings-nav-item.active {
box-shadow: inset 2px 0 0 var(--hr-text);
}
.hermes-relay-plugin .hr-settings-content {
min-width: 0;
}
.hermes-relay-plugin .hr-audit-details {
border: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-audit-details > summary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem;
cursor: pointer;
list-style: none;
}
.hermes-relay-plugin .hr-audit-details > summary::-webkit-details-marker {
display: none;
}
.hermes-relay-plugin .hr-audit-blocks,
.hermes-relay-plugin .hr-audit-empty {
padding: 0 0.75rem 0.75rem;
}
/* Pairing uses the host Dialog primitive; these rules only compose its body. */
.hermes-relay-plugin.hr-pair-dialog {
width: min(62rem, calc(100vw - 2rem));
max-width: 62rem;
max-height: min(90vh, 52rem);
overflow-x: hidden;
overflow-y: auto;
}
.hermes-relay-plugin.hr-pair-dialog [data-slot="dialog-header"] {
padding-right: 3rem;
}
.hermes-relay-plugin .hr-pair-body {
display: grid;
grid-template-columns: minmax(18rem, 0.9fr) minmax(22rem, 1.1fr);
gap: 1rem;
padding: 1rem;
}
.hermes-relay-plugin .hr-pair-qr-column,
.hermes-relay-plugin .hr-pair-options-column {
display: grid;
align-content: start;
gap: 0.75rem;
min-width: 0;
}
.hermes-relay-plugin .hr-pair-loading {
display: grid;
min-height: 20rem;
place-items: center;
border: 1px dashed var(--hr-border);
}
.hermes-relay-plugin .hr-pair-code-row,
.hermes-relay-plugin .hr-pair-connection-header,
.hermes-relay-plugin .hr-endpoint-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
}
.hermes-relay-plugin .hr-pair-panel,
.hermes-relay-plugin .hr-pair-advanced {
display: grid;
gap: 0.75rem;
padding: 0.85rem;
border: 1px solid var(--hr-border);
background: color-mix(in srgb, var(--hr-surface-muted) 50%, transparent);
}
.hermes-relay-plugin .hr-pair-panel-title,
.hermes-relay-plugin .hr-pair-advanced > summary {
font-family: var(--theme-font-display, var(--theme-font-sans));
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.hermes-relay-plugin .hr-endpoint-list {
display: grid;
border-top: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-endpoint-row {
padding: 0.65rem 0;
border-bottom: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-endpoint-row:last-child {
padding-bottom: 0;
border-bottom: 0;
}
.hermes-relay-plugin .hr-endpoint-address {
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hermes-relay-plugin .hr-pair-advanced {
padding: 0;
}
.hermes-relay-plugin .hr-pair-advanced > summary {
padding: 0.85rem;
cursor: pointer;
list-style: none;
}
.hermes-relay-plugin .hr-pair-advanced > summary::-webkit-details-marker {
display: none;
}
.hermes-relay-plugin .hr-pair-advanced-content {
padding: 0 0.85rem 0.85rem;
border-top: 1px solid var(--hr-border);
}
.hermes-relay-plugin .hr-pair-checkbox {
display: flex;
align-items: center;
gap: 0.5rem;
min-height: 2.25rem;
}
@media (max-width: 860px) {
.hermes-relay-plugin .hr-overview-grid,
.hermes-relay-plugin .hr-connection-choice-grid,
.hermes-relay-plugin .hr-settings-layout,
.hermes-relay-plugin .hr-pair-body {
grid-template-columns: 1fr;
}
.hermes-relay-plugin .hr-settings-nav {
display: flex;
overflow-x: auto;
}
.hermes-relay-plugin .hr-settings-nav-label {
display: none;
}
.hermes-relay-plugin .hr-settings-nav-item {
width: auto;
flex: 0 0 auto;
}
.hermes-relay-plugin .hr-settings-nav-item.active {
box-shadow: inset 0 -2px 0 var(--hr-text);
}
}
@media (max-width: 640px) {
.hermes-relay-plugin .hr-plugin-toolbar {
align-items: stretch;
flex-direction: column;
gap: 0.35rem;
}
.hermes-relay-plugin .hr-live-control {
align-self: flex-end;
padding-bottom: 0;
}
.hermes-relay-plugin .hr-service-header,
.hermes-relay-plugin .hr-device-card {
align-items: stretch;
flex-direction: column;
}
.hermes-relay-plugin .hr-service-details {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem;
}
.hermes-relay-plugin .hr-service-details > div {
min-width: 0;
padding: 0;
margin: 0;
border-right: 0;
}
.hermes-relay-plugin .hr-device-actions {
justify-content: flex-start;
}
.hermes-relay-plugin.hr-pair-dialog {
width: calc(100vw - 1rem);
max-height: calc(100vh - 1rem);
}
.hermes-relay-plugin .hr-pair-body {
padding: 0.75rem;
}
.hermes-relay-plugin .hr-pair-connection-header {
align-items: stretch;
flex-direction: column;
}
.hermes-relay-plugin .hr-pair-connection-header select {
width: 100%;
}
}
.hermes-relay-plugin .fixed {
position: fixed;
}
+40
View File
@@ -0,0 +1,40 @@
const SDK = window.__HERMES_PLUGIN_SDK__;
const { React } = SDK;
import BridgeActivity from "./BridgeActivity.jsx";
import MediaInspector from "./MediaInspector.jsx";
const { Tabs, TabsList, TabsTrigger } = SDK.components;
const VIEWS = [
{ key: "bridge", label: "Bridge activity" },
{ key: "media", label: "Media tokens" },
];
export default function ActivityHub({ autoRefresh }) {
return (
<Tabs defaultValue="bridge" className="hr-activity-tabs">
{(view, setView) => (
<>
<TabsList className="hr-activity-tablist" aria-label="Hermes-Relay activity views">
{VIEWS.map((item) => (
<TabsTrigger
key={item.key}
active={view === item.key}
value={item.key}
onClick={() => setView(item.key)}
>
{item.label}
</TabsTrigger>
))}
</TabsList>
{view === "bridge" ? (
<BridgeActivity autoRefresh={autoRefresh} />
) : (
<MediaInspector autoRefresh={autoRefresh} />
)}
</>
)}
</Tabs>
);
}
+2 -2
View File
@@ -100,7 +100,7 @@ export default function BridgeActivity({ autoRefresh }) {
if (error) {
return (
<Alert variant="destructive">
<AlertTitle>Relay unreachable</AlertTitle>
<AlertTitle>Hermes-Relay unreachable</AlertTitle>
<AlertDescription>
<pre className="whitespace-pre-wrap text-xs">{error}</pre>
{!autoRefresh ? (
@@ -118,7 +118,7 @@ export default function BridgeActivity({ autoRefresh }) {
<CardHeader>
<CardTitle>Bridge activity</CardTitle>
<CardDescription>
Most recent bridge commands routed through the relay. Newest first; capped at 100.
Most recent Bridge commands routed through Hermes-Relay. Newest first; capped at 100.
</CardDescription>
</CardHeader>
<CardContent>
+3 -3
View File
@@ -72,7 +72,7 @@ export default function MediaInspector({ autoRefresh }) {
if (error) {
return (
<Alert variant="destructive">
<AlertTitle>Relay unreachable</AlertTitle>
<AlertTitle>Hermes-Relay unreachable</AlertTitle>
<AlertDescription>
<pre className="whitespace-pre-wrap text-xs">{error}</pre>
{!autoRefresh ? (
@@ -90,9 +90,9 @@ export default function MediaInspector({ autoRefresh }) {
return (
<Card>
<CardHeader>
<CardTitle>Media inspector</CardTitle>
<CardTitle>Media tokens</CardTitle>
<CardDescription>
Active MediaRegistry tokens. Expired entries are hidden by default.
Diagnostic view of token-backed Hermes-Relay media. Bare-path deliveries are not included.
</CardDescription>
</CardHeader>
<CardContent>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,47 @@
import test from "node:test";
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
const read = (path) => readFileSync(new URL(path, import.meta.url), "utf8");
test("Hermes-Relay navigation separates overview, devices, activity, and settings", () => {
const source = read("../src/index.jsx");
for (const label of ["Overview", "Devices", "Activity", "Remote Access", "Git", "Settings"]) {
assert.match(source, new RegExp(`label: "${label}"`));
}
assert.doesNotMatch(source, /label: "Management"|label: "Media"/);
assert.match(source, /<Tabs defaultValue="overview"/);
});
test("overview does not present transient Bridge or raw media registry counters", () => {
const source = read("../src/tabs/RelayManagement.jsx");
assert.doesNotMatch(source, /pending_commands|media_entry_count|Pending \/ media/);
assert.match(source, /label="Last Bridge event"/);
assert.match(source, /label="Remote access"/);
});
test("pairing uses the host dialog and keeps advanced connection options secondary", () => {
const source = read("../src/components/PairDialog.jsx");
assert.match(source, /<Dialog open=\{open\}/);
assert.match(source, /<DialogContent className="hermes-relay-plugin hr-pair-dialog">/);
assert.match(source, /Advanced connection options/);
assert.doesNotMatch(source, /hr-modal-backdrop/);
});
test("media is labeled as a bounded token diagnostic", () => {
const source = read("../src/tabs/MediaInspector.jsx");
assert.match(source, /<CardTitle>Media tokens<\/CardTitle>/);
assert.match(source, /Bare-path deliveries are not included/);
});
test("switch fallback preserves switch semantics when the host omits the primitive", () => {
const source = read("../src/lib/ui-shims.jsx");
assert.match(source, /role="switch"/);
assert.match(source, /aria-checked=\{!!checked\}/);
assert.doesNotMatch(source, /type="checkbox"[\s\S]*onCheckedChange/);
});
+57 -10
View File
@@ -281,11 +281,46 @@ def resolve_repo_path(repo: Path, path: str) -> str:
def repo_status(repo: Path) -> dict[str, Any]:
"""Return grouped working-tree status with counts and truncation flag."""
porcelain = _git(repo, "status", "--porcelain=v1", "-z")
staged: list[dict[str, str]] = []
modified: list[dict[str, str]] = []
untracked: list[dict[str, str]] = []
staged: list[dict[str, Any]] = []
modified: list[dict[str, Any]] = []
untracked: list[dict[str, Any]] = []
truncated = False
def _numstat(*args: str) -> dict[str, tuple[int, int]]:
"""Return bounded text-line deltas keyed by the destination path.
``--numstat -z`` keeps tabs/newlines in filenames unambiguous. Binary
files report ``-`` for each count and intentionally remain without a
line delta in the UI.
"""
raw = _git(repo, "diff", "--numstat", "-z", *args)
values = raw.split("\0")
result: dict[str, tuple[int, int]] = {}
index = 0
while index < len(values):
record = values[index]
index += 1
if not record:
continue
fields = record.split("\t", 2)
if len(fields) != 3:
continue
added, deleted, path = fields
if not path:
# Rename/copy records place old and new paths in the next two
# NUL-delimited fields. Status exposes the destination path.
index += 1
if index >= len(values):
break
path = values[index]
index += 1
if added.isdigit() and deleted.isdigit():
result[path] = (int(added), int(deleted))
return result
staged_numstat = _numstat("--cached", "--")
modified_numstat = _numstat("--")
# -z separates records with NUL; each record is "<XY> <path>\0". A rename
# or copy emits TWO records ("R new\0old\0"); the bare source-path record
# must be skipped, not misparsed as an XY record.
@@ -301,33 +336,45 @@ def repo_status(repo: Path) -> dict[str, Any]:
if not path:
continue
if xy == "??":
untracked.append({"path": path})
untracked.append({"path": path, "additions": None, "deletions": None})
# Independent checks: a file staged AND modified lands in both groups.
if xy[0] in ("M", "A", "D", "R", "C"):
staged.append({"path": path})
additions, deletions = staged_numstat.get(path, (None, None))
staged.append({"path": path, "additions": additions, "deletions": deletions})
if xy[1] in ("M", "D"):
modified.append({"path": path})
additions, deletions = modified_numstat.get(path, (None, None))
modified.append({"path": path, "additions": additions, "deletions": deletions})
if xy[0] in ("R", "C"):
# The immediately following record is the rename/copy source path;
# skip it so it is not misparsed as an XY record.
i += 1
def _bounded(items: list[dict[str, str]]) -> list[dict[str, str]]:
def _bounded(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
nonlocal truncated
if len(items) > MAX_STATUS_ENTRIES:
truncated = True
return items[:MAX_STATUS_ENTRIES]
return items
staged_count = len(staged)
modified_count = len(modified)
untracked_count = len(untracked)
changed_count = len({entry["path"] for entry in (*staged, *modified, *untracked)})
additions = sum(added for added, _ in (*staged_numstat.values(), *modified_numstat.values()))
deletions = sum(deleted for _, deleted in (*staged_numstat.values(), *modified_numstat.values()))
staged = _bounded(staged)
modified = _bounded(modified)
untracked = _bounded(untracked)
return {
"counts": {
"staged": len(staged),
"modified": len(modified),
"untracked": len(untracked),
"staged": staged_count,
"modified": modified_count,
"untracked": untracked_count,
"changes": changed_count,
"additions": additions,
"deletions": deletions,
},
"staged": staged,
"modified": modified,
+12
View File
@@ -150,9 +150,18 @@ class GitStateStatusTests(unittest.TestCase):
self.assertEqual(1, status["counts"]["staged"])
self.assertEqual(1, status["counts"]["modified"])
self.assertEqual(1, status["counts"]["untracked"])
self.assertEqual(3, status["counts"]["changes"])
self.assertEqual(2, status["counts"]["additions"])
self.assertEqual(2, status["counts"]["deletions"])
self.assertEqual("tracked.txt", status["staged"][0]["path"])
self.assertEqual(1, status["staged"][0]["additions"])
self.assertEqual(1, status["staged"][0]["deletions"])
self.assertEqual("README.md", status["modified"][0]["path"])
self.assertEqual(1, status["modified"][0]["additions"])
self.assertEqual(1, status["modified"][0]["deletions"])
self.assertEqual("untracked.txt", status["untracked"][0]["path"])
self.assertIsNone(status["untracked"][0]["additions"])
self.assertIsNone(status["untracked"][0]["deletions"])
self.assertFalse(status["truncated"])
def test_status_truncates_when_over_cap(self) -> None:
@@ -160,6 +169,7 @@ class GitStateStatusTests(unittest.TestCase):
(self.repo / f"file-{i}.txt").write_text("x", encoding="utf-8")
status = git_state.repo_status(self.repo)
self.assertTrue(status["truncated"])
self.assertEqual(git_state.MAX_STATUS_ENTRIES + 5, status["counts"]["changes"])
self.assertLessEqual(
len(status["untracked"]),
git_state.MAX_STATUS_ENTRIES,
@@ -193,6 +203,8 @@ class GitStateStatusTests(unittest.TestCase):
status = git_state.repo_status(self.repo)
self.assertEqual(["new.txt"], [e["path"] for e in status["staged"]])
self.assertEqual(0, status["staged"][0]["additions"])
self.assertEqual(0, status["staged"][0]["deletions"])
self.assertEqual([], status["modified"])
self.assertEqual([], status["untracked"])
+3
View File
@@ -30,13 +30,16 @@ FOCUSED_TESTS = (
"com.hermesandroid.relay.ui.components.BackgroundTaskCardTest",
"com.hermesandroid.relay.ui.components.DotMatrixIndicatorTest",
"com.hermesandroid.relay.ui.components.AttachmentGalleryLayoutTest",
"com.hermesandroid.relay.ui.components.ChangelogParserTest",
"com.hermesandroid.relay.ui.components.MarkdownStreamingParserTest",
"com.hermesandroid.relay.ui.screens.ChangelogScreenTest",
"com.hermesandroid.relay.ui.screens.ChatUnreadStateTest",
)
REPOSITORY_CHECKS = (
"check-android-locales.py",
"check-user-docs-locales.py",
"check-android-collection-apis.py",
"check-android-release-notes.py",
"check-version-tracks.py",
)
+11 -10
View File
@@ -66,16 +66,17 @@ git diff --no-color "$LIBS" || true
echo " --------------------------------------------------------"
echo ""
echo " Next steps:"
echo " 1. Update CHANGELOG.md, RELEASE_NOTES.md, app/src/main/assets/whats_new.txt,"
echo " app/src/main/assets/changelog.json, and"
echo " app/src/googlePlay/play/release-notes/en-US/default.txt"
echo " - whats_new.txt holds ONLY the latest version (auto-dialog fallback +"
echo " Play Console 'What's new' source; gradle-play-publisher reads default.txt; <=500 chars/lang)"
echo " - changelog.json: PREPEND a new {version,title,date,sections[]} block (newest first)"
echo " to versions[]; it backs the in-app What's New dialog + full Settings changelog"
echo " 2. Commit on dev:"
echo " git add $LIBS CHANGELOG.md RELEASE_NOTES.md app/src/main/assets/whats_new.txt app/src/main/assets/changelog.json app/src/googlePlay/play/release-notes/en-US/default.txt"
echo " 1. Update CHANGELOG.md, RELEASE_NOTES.md, and prepend the curated Android"
echo " release entry to app/src/main/assets/changelog.json. The newest entry"
echo " requires highlight {title,summary,bullets[1..3]}, improvements[0..2],"
echo " toastDigest {additionalFeatureCount,fixCount,preview[0..2]}, playNotes,"
echo " and the technical sections retained for history."
echo " 2. Refresh and validate the derived in-app fallback + Play notes:"
echo " python scripts/check-android-release-notes.py --write"
echo " python scripts/check-android-release-notes.py"
echo " 3. Commit on a release-prep branch targeting dev:"
echo " git add $LIBS CHANGELOG.md RELEASE_NOTES.md app/src/main/assets/whats_new.txt app/src/main/assets/changelog.json app/src/googlePlay/play/release-notes/en-US/default.txt docs/play-store-listing.md"
echo " git commit -m \"release(android): android-v$NEW_VERSION\""
echo " 3. Merge dev -> main, then tag main:"
echo " 4. After the approved dev -> main release PR, tag the new main tip:"
echo " git tag android-v$NEW_VERSION"
echo " git push origin android-v$NEW_VERSION"
+211
View File
@@ -0,0 +1,211 @@
#!/usr/bin/env python3
"""Validate and synchronize Android release-note surfaces.
The newest ``changelog.json`` entry is the curated source for the in-app
What's New experience. ``--write`` refreshes the legacy text fallback, Google
Play notes, and the matching operator copy in ``docs/play-store-listing.md``.
The technical CHANGELOG and GitHub release body remain fuller records, but
their version headings are checked so release prep cannot silently drift.
"""
from __future__ import annotations
import argparse
import json
import pathlib
import re
import sys
import tomllib
from typing import Any
REPO_ROOT = pathlib.Path(__file__).resolve().parents[1]
CHANGELOG_JSON = pathlib.Path("app/src/main/assets/changelog.json")
WHATS_NEW = pathlib.Path("app/src/main/assets/whats_new.txt")
PLAY_NOTES = pathlib.Path("app/src/googlePlay/play/release-notes/en-US/default.txt")
PLAY_LISTING = pathlib.Path("docs/play-store-listing.md")
PLAY_SECTION_RE = re.compile(
r"(## Release Notes\s+Paste into Play Console → \*\*What's new\*\* "
r"\(≤500 characters\):\s+```\s*\n)(.*?)(\n```\s*\n## Category)",
re.DOTALL,
)
def _read_text(relative: pathlib.Path) -> str:
return (REPO_ROOT / relative).read_text(encoding="utf-8")
def _android_version() -> str:
versions = tomllib.loads(_read_text(pathlib.Path("gradle/libs.versions.toml"))).get(
"versions", {}
)
return str(versions.get("appVersionName", ""))
def _latest_entry() -> dict[str, Any]:
data = json.loads(_read_text(CHANGELOG_JSON))
if not isinstance(data, dict) or data.get("schema") != 2:
raise ValueError("changelog.json must use schema 2")
versions = data.get("versions")
if not isinstance(versions, list) or not versions or not isinstance(versions[0], dict):
raise ValueError("changelog.json must contain at least one version")
return versions[0]
def validate_curated_entry(entry: dict[str, Any], expected_version: str) -> list[str]:
errors: list[str] = []
version = entry.get("version")
if version != expected_version:
errors.append(
f"latest changelog version is {version!r}, expected Android {expected_version!r}"
)
for field in ("title", "date"):
if not isinstance(entry.get(field), str) or not entry[field].strip():
errors.append(f"latest changelog entry requires non-empty {field}")
highlight = entry.get("highlight")
if not isinstance(highlight, dict):
errors.append("latest changelog entry requires a highlight object")
highlight = {}
for field in ("title", "summary"):
if not isinstance(highlight.get(field), str) or not highlight[field].strip():
errors.append(f"latest changelog highlight requires non-empty {field}")
bullets = highlight.get("bullets")
if not isinstance(bullets, list):
errors.append("latest changelog highlight bullets must be an array")
bullets = []
elif not 1 <= len(bullets) <= 3:
errors.append("latest changelog highlight must contain 1-3 bullets")
if any(not isinstance(item, str) or not item.strip() for item in bullets):
errors.append("latest changelog highlight bullets must be non-empty strings")
improvements = entry.get("improvements", [])
if not isinstance(improvements, list):
errors.append("latest changelog improvements must be an array")
improvements = []
elif len(improvements) > 2:
errors.append("latest changelog may contain at most 2 improvements")
if any(not isinstance(item, str) or not item.strip() for item in improvements):
errors.append("latest changelog improvements must be non-empty strings")
if len(bullets) + len(improvements) > 5:
errors.append("latest changelog may expose at most 5 total list items")
digest = entry.get("toastDigest")
if not isinstance(digest, dict):
errors.append("latest changelog entry requires a toastDigest object")
digest = {}
digest_counts: list[int] = []
for field in ("additionalFeatureCount", "fixCount"):
count = digest.get(field)
if isinstance(count, bool) or not isinstance(count, int) or count < 0:
errors.append(f"latest changelog toastDigest {field} must be a non-negative integer")
else:
digest_counts.append(count)
digest_preview = digest.get("preview")
if not isinstance(digest_preview, list):
errors.append("latest changelog toastDigest preview must be an array")
digest_preview = []
elif any(not isinstance(item, str) or not item.strip() for item in digest_preview):
errors.append("latest changelog toastDigest preview items must be non-empty strings")
if len(digest_counts) == 2:
if sum(digest_counts) == 0 and digest_preview:
errors.append("latest changelog toastDigest preview must be empty when counts are zero")
elif sum(digest_counts) > 0 and not 1 <= len(digest_preview) <= 2:
errors.append("latest changelog toastDigest preview must contain 1-2 items when secondary items exist")
play_notes = entry.get("playNotes")
if not isinstance(play_notes, str) or not play_notes.strip():
errors.append("latest changelog entry requires non-empty playNotes")
elif len(render_play_notes(entry)) > 500:
errors.append("rendered Google Play notes exceed 500 characters")
return errors
def render_whats_new(entry: dict[str, Any]) -> str:
highlight = entry["highlight"]
lines = [
f"v{entry['version']} - {entry['title']}",
"",
highlight["title"],
*(f"* {bullet}" for bullet in highlight["bullets"]),
]
improvements = entry.get("improvements", [])
if improvements:
lines.extend(("", "Also improved", *(f"* {item}" for item in improvements)))
return "\n".join(lines) + "\n"
def render_play_notes(entry: dict[str, Any]) -> str:
return f"v{entry['version']} - {entry['title']}\n\n{entry['playNotes'].strip()}\n"
def _replace_play_listing(current: str, rendered: str) -> str:
match = PLAY_SECTION_RE.search(current)
if not match:
raise ValueError("docs/play-store-listing.md has no recognized Release Notes block")
return current[: match.start()] + match.group(1) + rendered.rstrip() + match.group(3) + current[match.end() :]
def _check_exact(relative: pathlib.Path, expected: str, errors: list[str]) -> None:
actual = _read_text(relative).replace("\r\n", "\n")
if actual != expected:
errors.append(f"{relative.as_posix()} is stale; run this script with --write")
def _validate_record_versions(version: str, errors: list[str]) -> None:
changelog = _read_text(pathlib.Path("CHANGELOG.md"))
if f"## [Android {version}]" not in changelog:
errors.append(f"CHANGELOG.md has no [Android {version}] release heading")
release_notes = _read_text(pathlib.Path("RELEASE_NOTES.md"))
if not release_notes.startswith(f"# Hermes-Relay Android v{version}\n"):
errors.append(f"RELEASE_NOTES.md does not describe Android v{version}")
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--write",
action="store_true",
help="Refresh derived in-app fallback and Play release-note files",
)
args = parser.parse_args()
try:
version = _android_version()
entry = _latest_entry()
errors = validate_curated_entry(entry, version)
if errors:
raise ValueError("\n".join(errors))
whats_new = render_whats_new(entry)
play_notes = render_play_notes(entry)
listing = _replace_play_listing(_read_text(PLAY_LISTING), play_notes)
except (OSError, ValueError, json.JSONDecodeError, tomllib.TOMLDecodeError) as exc:
print(f"Android release-note check failed: {exc}", file=sys.stderr)
return 1
if args.write:
(REPO_ROOT / WHATS_NEW).write_text(whats_new, encoding="utf-8", newline="\n")
(REPO_ROOT / PLAY_NOTES).write_text(play_notes, encoding="utf-8", newline="\n")
(REPO_ROOT / PLAY_LISTING).write_text(listing, encoding="utf-8", newline="\n")
print("Android release-note derivatives refreshed")
return 0
errors = []
_check_exact(WHATS_NEW, whats_new, errors)
_check_exact(PLAY_NOTES, play_notes, errors)
if _read_text(PLAY_LISTING).replace("\r\n", "\n") != listing:
errors.append("docs/play-store-listing.md release notes are stale; run this script with --write")
_validate_record_versions(version, errors)
if errors:
print("Android release-note validation failed:", file=sys.stderr)
for error in errors:
print(f" - {error}", file=sys.stderr)
return 1
print(f"Android release notes are aligned for v{version}")
return 0
if __name__ == "__main__":
raise SystemExit(main())
+70
View File
@@ -0,0 +1,70 @@
#!/usr/bin/env python3
"""Classify whether a stable release commit needs reconciliation into dev."""
from __future__ import annotations
import argparse
import subprocess
from collections.abc import Callable, Sequence
def classify_release(
release_commit: str,
dev_commit: str,
parents: Sequence[str],
is_ancestor: Callable[[str, str], bool],
) -> str:
"""Return already-contained, normal-release, or hotfix."""
if is_ancestor(release_commit, dev_commit):
return "already-contained"
if len(parents) < 2:
raise ValueError("stable release commit is not a release/hotfix merge commit")
if is_ancestor(parents[1], dev_commit):
return "normal-release"
return "hotfix"
def git(*args: str) -> str:
result = subprocess.run(
["git", *args],
check=True,
capture_output=True,
text=True,
)
return result.stdout.strip()
def git_is_ancestor(older: str, newer: str) -> bool:
result = subprocess.run(
["git", "merge-base", "--is-ancestor", older, newer],
check=False,
capture_output=True,
text=True,
)
if result.returncode not in {0, 1}:
raise RuntimeError(result.stderr.strip() or "git merge-base failed")
return result.returncode == 0
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--release-commit", required=True)
parser.add_argument("--dev-commit", required=True)
args = parser.parse_args()
release_commit = git("rev-parse", f"{args.release_commit}^{{commit}}")
dev_commit = git("rev-parse", f"{args.dev_commit}^{{commit}}")
parents = git("show", "-s", "--format=%P", release_commit).split()
print(
classify_release(
release_commit,
dev_commit,
parents,
git_is_ancestor,
)
)
return 0
if __name__ == "__main__":
raise SystemExit(main())
@@ -0,0 +1,97 @@
from __future__ import annotations
import importlib.util
import pathlib
import unittest
SCRIPT = pathlib.Path(__file__).resolve().parents[1] / "check-android-release-notes.py"
SPEC = importlib.util.spec_from_file_location("check_android_release_notes", SCRIPT)
assert SPEC is not None and SPEC.loader is not None
release_notes = importlib.util.module_from_spec(SPEC)
SPEC.loader.exec_module(release_notes)
def entry(*, bullets: int = 3, improvements: int = 2) -> dict[str, object]:
return {
"version": "1.2.3",
"title": "A useful release",
"date": "2026-08-26",
"highlight": {
"title": "The main reason to care",
"summary": "A short explanation in plain language.",
"bullets": [f"Benefit {index}" for index in range(bullets)],
},
"improvements": [f"Improvement {index}" for index in range(improvements)],
"toastDigest": {
"additionalFeatureCount": 1,
"fixCount": 2,
"preview": ["Secondary feature", "Important fix"],
},
"playNotes": "A concise Play Store summary.",
}
class AndroidReleaseNotesTest(unittest.TestCase):
def test_allows_three_highlights_and_two_improvements(self) -> None:
self.assertEqual([], release_notes.validate_curated_entry(entry(), "1.2.3"))
def test_rejects_more_than_three_highlights(self) -> None:
errors = release_notes.validate_curated_entry(entry(bullets=4, improvements=0), "1.2.3")
self.assertIn("latest changelog highlight must contain 1-3 bullets", errors)
def test_rejects_more_than_five_visible_items(self) -> None:
errors = release_notes.validate_curated_entry(entry(bullets=3, improvements=3), "1.2.3")
self.assertIn("latest changelog may contain at most 2 improvements", errors)
self.assertIn("latest changelog may expose at most 5 total list items", errors)
def test_renders_fallback_with_curated_groups(self) -> None:
rendered = release_notes.render_whats_new(entry(bullets=1, improvements=1))
self.assertIn("The main reason to care\n* Benefit 0", rendered)
self.assertIn("Also improved\n* Improvement 0", rendered)
def test_play_notes_include_version_and_stay_bounded(self) -> None:
rendered = release_notes.render_play_notes(entry())
self.assertTrue(rendered.startswith("v1.2.3 - A useful release"))
self.assertLessEqual(len(rendered), 500)
def test_allows_a_hero_only_release_without_secondary_filler(self) -> None:
release = entry()
release["toastDigest"] = {
"additionalFeatureCount": 0,
"fixCount": 0,
"preview": [],
}
self.assertEqual([], release_notes.validate_curated_entry(release, "1.2.3"))
def test_rejects_preview_when_secondary_counts_are_zero(self) -> None:
release = entry()
release["toastDigest"] = {
"additionalFeatureCount": 0,
"fixCount": 0,
"preview": ["Invented filler"],
}
errors = release_notes.validate_curated_entry(release, "1.2.3")
self.assertIn("latest changelog toastDigest preview must be empty when counts are zero", errors)
def test_requires_a_bounded_preview_for_secondary_items(self) -> None:
release = entry()
release["toastDigest"] = {
"additionalFeatureCount": 1,
"fixCount": 2,
"preview": ["one", "two", "three"],
}
errors = release_notes.validate_curated_entry(release, "1.2.3")
self.assertIn(
"latest changelog toastDigest preview must contain 1-2 items when secondary items exist",
errors,
)
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,50 @@
from __future__ import annotations
import unittest
from scripts.plan_release_backmerge import classify_release
class ReleaseBackmergePlanTest(unittest.TestCase):
def test_already_contained_release_is_a_noop(self) -> None:
ancestry = {("release", "dev")}
self.assertEqual(
classify_release(
"release",
"dev",
["main", "topic"],
lambda older, newer: (older, newer) in ancestry,
),
"already-contained",
)
def test_normal_release_with_dev_parent_is_a_noop(self) -> None:
ancestry = {("released-dev", "dev")}
self.assertEqual(
classify_release(
"release",
"dev",
["previous-main", "released-dev"],
lambda older, newer: (older, newer) in ancestry,
),
"normal-release",
)
def test_selective_hotfix_requires_backmerge(self) -> None:
self.assertEqual(
classify_release(
"release",
"dev",
["previous-main", "hotfix-topic"],
lambda _older, _newer: False,
),
"hotfix",
)
def test_non_merge_release_commit_fails_closed(self) -> None:
with self.assertRaisesRegex(ValueError, "not a release/hotfix merge commit"):
classify_release("release", "dev", ["parent"], lambda _older, _newer: False)
if __name__ == "__main__":
unittest.main()
+1
View File
@@ -250,6 +250,7 @@ export default defineConfig({
{ text: 'Token Tracking', link: '/features/tokens' },
{ text: 'Tool Progress', link: '/features/tools' },
{ text: 'Plugins', link: '/features/plugins' },
{ text: 'Git Workspace', link: '/features/git-workspace' },
{ text: 'Phone Control Tools', link: '/features/phone-control-tools' },
{ text: 'Dashboard Plugin', link: '/features/dashboard' },
],
+3 -3
View File
@@ -17,8 +17,8 @@ Sphere and phone-local pet controls live under **Settings → Appearance**.
The background and floating-pet selections are saved independently. You can use
the same installed pack in either role, choose different packs, or turn either
one off. A background animation reacts on the central Chat, clean/ambient, and
voice surfaces; it never roams, uses floating-pet placement, or inherits pet
one off. A background animation reacts on the central Chat and voice surfaces;
it never roams, uses floating-pet placement, or inherits pet
temperament.
## Profile badge image
@@ -234,7 +234,7 @@ normal Hermes Relay screens.
move actions remain available on screens that use the saved free-form edge home,
so dragging is never required.
- Chat temporarily hides the pet while the session drawer, a picker or info
sheet, clean mode, or voice mode owns the screen. Inline slash suggestions and
sheet, or voice mode owns the screen. Inline slash suggestions and
recent-prompt chips stay visible, but are measured as blocked controls so a
roaming pet routes around them.
- On every other screen, opening a dialog or modal sheet temporarily hides the

Some files were not shown because too many files have changed in this diff Show More