Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# User-friendly tmux configuration for Ushadow environments
# Global tmux configuration

# Enable mouse support (scroll, select, resize panes)
set -g mouse on
Expand Down Expand Up @@ -29,3 +29,12 @@ set -g pane-active-border-style fg=colour39

# Fix mouse scrolling in terminal applications
set -g terminal-overrides 'xterm*:smcup@:rmcup@'

# macOS clipboard integration
# Mouse drag to select text in copy mode automatically copies to system clipboard
set -g set-clipboard on
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"

# Paste with prefix+p from tmux buffer, or just use Cmd+V in iTerm
bind-key p run "pbpaste | tmux load-buffer - && tmux paste-buffer"
2 changes: 2 additions & 0 deletions .workmux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ post_create:

# Commands to run before merging (aborts merge if any fail)
pre_merge:
# Update ticket status to done when merging
- "kanban-cli move-to-done \"$WM_WORKTREE_PATH\" || true"
# Ensure tests pass before merging
# - "make test" # Uncomment when test suite is ready

Expand Down
37 changes: 37 additions & 0 deletions scripts/register-one-worktree.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Quick helper to register a single worktree with workmux
# Usage: ./register-one-worktree.sh blue

set -euo pipefail

if [[ $# -ne 1 ]]; then
echo "Usage: $0 <worktree-name>"
echo "Example: $0 blue"
exit 1
fi

WORKTREE_NAME="$1"
WORKTREE_PATH="/Users/stu/repos/worktrees/ushadow/$WORKTREE_NAME"

if [[ ! -d "$WORKTREE_PATH" ]]; then
echo "❌ Worktree not found: $WORKTREE_PATH"
exit 1
fi

if [[ -z "${TMUX:-}" ]]; then
echo "❌ Must be run from inside a tmux session"
echo " Run: tmux attach -t workmux"
exit 1
fi

echo "📝 Registering worktree: $WORKTREE_NAME"
cd "$WORKTREE_PATH"

if workmux open "$WORKTREE_NAME" 2>&1 | tee /tmp/workmux-open.log | grep -q "Opened tmux window"; then
echo "✅ Successfully registered!"
echo " Run 'workmux list' to verify"
else
echo "❌ Failed to register. Error:"
cat /tmp/workmux-open.log
exit 1
fi
60 changes: 60 additions & 0 deletions scripts/register-worktrees-with-workmux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
# Register existing launcher-created worktrees with workmux for dashboard visibility
# This is a one-time migration script

set -euo pipefail

WORKTREES_DIR="/Users/stu/repos/worktrees/ushadow"
MAIN_REPO="/Users/stu/repos/Ushadow"

echo "🔄 Registering existing worktrees with workmux..."
echo ""

# Counter for stats
registered=0
skipped=0
failed=0

# Iterate through all worktree directories
for worktree_path in "$WORKTREES_DIR"/*; do
# Skip if not a directory
if [[ ! -d "$worktree_path" ]]; then
continue
fi

# Get the worktree name (directory basename)
worktree_name=$(basename "$worktree_path")

# Skip special directories
if [[ "$worktree_name" == "." || "$worktree_name" == ".." || "$worktree_name" == ".DS_Store" || "$worktree_name" == ".serena" ]]; then
continue
fi

# Check if it's actually a git worktree (linked worktrees have .git as a file, not directory)
if [[ ! -e "$worktree_path/.git" ]]; then
echo "⚠️ Skipping $worktree_name (not a git worktree)"
((skipped++))
continue
fi

echo "📝 Registering: $worktree_name"

# Register with workmux (by default, it doesn't run hooks or file operations)
if (cd "$worktree_path" && workmux open "$worktree_name" 2>&1 | grep -q "Opened tmux window"); then
echo " ✅ Successfully registered"
((registered++))
else
echo " ❌ Failed to register"
((failed++))
fi
echo ""
done

echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📊 Registration Summary:"
echo " ✅ Registered: $registered"
echo " ⚠️ Skipped: $skipped"
echo " ❌ Failed: $failed"
echo ""
echo "💡 Run 'workmux dashboard' to see your worktrees!"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
2 changes: 1 addition & 1 deletion ushadow/backend/src/config/keycloak_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_keycloak_admin() -> KeycloakAdmin:
settings = get_settings()

# Get application realm to manage
app_realm = settings.get_sync("keycloak.realm", "master")
app_realm = settings.get_sync("keycloak.realm", "ushadow")

# Internal URL for backend-to-Keycloak communication
# Resolved by OmegaConf: ${oc.env:KC_URL,http://keycloak:8080}
Expand Down
13 changes: 5 additions & 8 deletions ushadow/launcher/.claude/hooks/idle-notification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
# Move ticket to in_review when agent is waiting for user input

# Log for debugging
echo "[$(date)] idle-notification hook fired" >> /tmp/claude-kanban-hooks.log
echo "[$(date)] idle-notification hook fired in $(pwd)" >> /tmp/claude-kanban-hooks.log

BRANCH=$(git branch --show-current 2>/dev/null)

if [ -z "$BRANCH" ]; then
exit 0
fi
# Use worktree path (more reliable than branch name)
WORKTREE_PATH="$(pwd)"

if command -v kanban-cli >/dev/null 2>&1; then
kanban-cli move-to-review "$BRANCH" 2>/dev/null
echo "[$(date)] Moved $BRANCH to review" >> /tmp/claude-kanban-hooks.log
kanban-cli move-to-review "$WORKTREE_PATH" 2>/dev/null
echo "[$(date)] Moved ticket at $WORKTREE_PATH to review" >> /tmp/claude-kanban-hooks.log
fi

exit 0
9 changes: 3 additions & 6 deletions ushadow/launcher/.claude/hooks/session-end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
# Claude Code SessionEnd hook - agent session ending
# Move ticket to in_review (waiting for human to review/respond)

BRANCH=$(git branch --show-current 2>/dev/null)

if [ -z "$BRANCH" ]; then
exit 0
fi
# Use worktree path (more reliable than branch name)
WORKTREE_PATH="$(pwd)"

if command -v kanban-cli >/dev/null 2>&1; then
kanban-cli move-to-review "$BRANCH" 2>/dev/null
kanban-cli move-to-review "$WORKTREE_PATH" 2>/dev/null
fi

exit 0
9 changes: 3 additions & 6 deletions ushadow/launcher/.claude/hooks/session-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
# Claude Code SessionStart hook - agent session just started
# Move ticket to in_progress

BRANCH=$(git branch --show-current 2>/dev/null)

if [ -z "$BRANCH" ]; then
exit 0
fi
# Use worktree path (more reliable than branch name)
WORKTREE_PATH="$(pwd)"

if command -v kanban-cli >/dev/null 2>&1; then
kanban-cli move-to-progress "$BRANCH" 2>/dev/null
kanban-cli move-to-progress "$WORKTREE_PATH" 2>/dev/null
fi

exit 0
9 changes: 3 additions & 6 deletions ushadow/launcher/.claude/hooks/user-prompt-submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
# Claude Code UserPromptSubmit hook - user just submitted a prompt
# Move ticket to in_progress (agent resuming work after waiting)

BRANCH=$(git branch --show-current 2>/dev/null)

if [ -z "$BRANCH" ]; then
exit 0
fi
# Use worktree path (more reliable than branch name)
WORKTREE_PATH="$(pwd)"

if command -v kanban-cli >/dev/null 2>&1; then
kanban-cli move-to-progress "$BRANCH" 2>/dev/null
kanban-cli move-to-progress "$WORKTREE_PATH" 2>/dev/null
fi

exit 0
51 changes: 50 additions & 1 deletion ushadow/launcher/.claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,56 @@
"Bash(git rebase:*)",
"Bash(git merge:*)",
"Bash(git checkout:*)",
"Bash(git add:*)"
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(kanban-cli:*)"
]
},
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": ".claude/hooks/session-start.sh",
"async": true
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": ".claude/hooks/user-prompt-submit.sh",
"async": true
}
]
}
],
"Notification": [
{
"matcher": ".*",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/idle-notification.sh",
"async": true
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": ".claude/hooks/session-end.sh",
"async": true
}
]
}
]
}
}
4 changes: 2 additions & 2 deletions ushadow/launcher/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/ushadow-icon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ushadow Launcher</title>
<script type="module" crossorigin src="/assets/index-Co576g8k.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-fIdOEVtj.css">
<script type="module" crossorigin src="/assets/index-D6l17x5B.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DuiMio-J.css">
</head>
<body class="bg-surface-900 text-text-primary">
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion ushadow/launcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ushadow-launcher",
"version": "0.8.0",
"version": "0.8.1",
"description": "Ushadow Desktop Launcher",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion ushadow/launcher/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ushadow/launcher/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ushadow-launcher"
version = "0.8.0"
version = "0.8.1"
description = "Ushadow Desktop Launcher"
authors = ["Ushadow"]
license = "MIT"
Expand Down
Loading
Loading