Skip to content

feat: session card layout — time + unread + status positioning - #56

Merged
aterrylu merged 6 commits into
mainfrom
terry/auto-install-hooks
Mar 24, 2026
Merged

feat: session card layout — time + unread + status positioning#56
aterrylu merged 6 commits into
mainfrom
terry/auto-install-hooks

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

Summary

Restructured sidebar session card layout for better information hierarchy:

● autonomOS@home              3m  ·2
  autonomOS · main              Idle

◐ homelab-agent               5m ·12
  dev · main        Bash: npm test

▲ WEBOX-TOOL                 10m  ·3
  webox · main          Needs input
  • Top row: status icon + session title (left), time + unread count in red (right)
  • Bottom row: project · branch (left), status label (right)
  • Default status for new sessions: spinning dashes (was broken dashed circle)
  • Unread count visible on all states

Test plan

  • Session cards show new layout
  • Unread count in red on top-right
  • Status label aligned to bottom-right
  • New sessions show spinning icon (not dashed circle)

🤖 Generated with Claude Code

@aterrylu aterrylu closed this Mar 24, 2026
@aterrylu aterrylu reopened this Mar 24, 2026
aterrylu and others added 6 commits March 24, 2026 02:02
Server now ensures the autonomos-relay.sh hook script is installed
and registered in Claude Code's settings.json on every startup.

- installHookRelay() runs at startup, after claude binary validation
- Copies hook script from packages/server/hooks/ to ~/.claude/hooks/
- Registers on 10 Claude Code hook events with async: true
- Idempotent: skips if already installed and up to date
- Updates script if bundled version is newer
- Uses ~ paths in settings.json (portable across machines)
- Non-fatal: warns on failure, server continues

No manual setup needed — just start the server and hooks are ready.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the file-based hook relay (autonomos-relay.sh + installHooks.ts)
with per-session hook injection via Claude Code's --settings flag.

How it works:
- createSession() passes --settings with hooks config as inline JSON
- Each hook event fires: curl -d @- $AUTONOMOS_SERVER/api/hooks/$SESSION_ID
- AUTONOMOS_SERVER and AUTONOMOS_SESSION_ID already injected by buildEnv()
- Merges with user's existing hooks (empirically verified)

What this eliminates:
- No relay script file to install
- No global settings.json mutation
- No install button needed
- No user action required
- Sessions outside autonomOS are completely unaffected

Deleted: installHooks.ts (no longer needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… right)

Restructured sidebar session rows:
- Top row: icon + title (left), time + unread count in red (right)
- Bottom row: project · branch (left), status label (right)
- Default status for new sessions: spinning (was dashed circle)
- Unread count shown on all states, not just needs-input

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aterrylu
aterrylu force-pushed the terry/auto-install-hooks branch from efa284b to c70edf7 Compare March 24, 2026 09:02
@aterrylu
aterrylu merged commit 05a0e96 into main Mar 24, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/auto-install-hooks branch March 24, 2026 09:03

@nox-0x nox-0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clean layout refactor — the hook relay injection in sessions.ts is solid (fire-and-forget curl with proper timeouts, no shell injection via array-based spawn). Sidebar changes achieve the intended info hierarchy without any edge-case risks. Minor note: framer-motion and lucide-react appear in bun.lock but aren't used in this diff — fine if they're for upcoming work. LGTM.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants