Skip to content

Add beads task for threaded conversations feature#14

Merged
khaliqgant merged 7 commits into
claude/multi-project-agent-sockets-RCkNsfrom
claude/review-pr-9-6HyEY
Dec 23, 2025
Merged

Add beads task for threaded conversations feature#14
khaliqgant merged 7 commits into
claude/multi-project-agent-sockets-RCkNsfrom
claude/review-pr-9-6HyEY

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

Track implementation of Slack-style thread replies with parent_message_id
tracking, nested UI display, and notification badges.

Track implementation of Slack-style thread replies with parent_message_id
tracking, nested UI display, and notification badges.
Frontend changes:
- Complete redesign with Slack-inspired layout (sidebar + main panel)
- Channel-based navigation (#general, #broadcasts, agent DMs)
- Command palette with Cmd+K for quick actions and search
- Presence indicators (online/offline) on agent avatars
- Message bubbles with avatars, timestamps, and hover actions
- Date dividers and thread indicators (UI ready for threads feature)
- Auto-resizing composer with target selector
- Typing indicator UI (infrastructure ready)

Backend changes:
- Add presence table for real-time status tracking
- Add read_state table for unread message counts
- Add presence management methods (updatePresence, getAllPresence)
- Add typing indicator support (setTypingIndicator)
- Add read state tracking (updateReadState, getUnreadCounts)

Design system:
- CSS custom properties for theming
- Inter font for UI, JetBrains Mono for code
- Slack-accurate color palette and spacing
Frontend TypeScript modules:
- types.ts: Type definitions for Agent, Message, AppState, DOMElements
- utils.ts: Utility functions (escapeHtml, formatTime, getAvatarColor, etc.)
- state.ts: Reactive state management with subscribe/notify pattern
- websocket.ts: WebSocket connection with reconnection logic
- components.ts: UI rendering (agents, messages, command palette)
- app.ts: Application entry point and event listeners
- index.ts: Module exports

Testing:
- utils.test.ts: Comprehensive tests for utility functions
- state.test.ts: Tests for state management and message filtering
- vitest.config.ts: Added jsdom environment for frontend tests

Build configuration:
- Added esbuild for bundling frontend TypeScript
- Added build:frontend script to package.json
- Added jsdom dev dependency for DOM testing
- Created frontend-specific tsconfig.json

HTML updated to load bundled /js/app.js module
@khaliqgant khaliqgant changed the base branch from main to claude/multi-project-agent-sockets-RCkNs December 23, 2025 07:52
claude and others added 4 commits December 23, 2025 07:59
- Exclude src/dashboard/frontend from main tsconfig to prevent DOM type errors
- Fix project-namespace test to check for .project marker instead of just data dir
- Add built frontend bundle
- .env.example: Environment variables reference
- cli-usage.sh: CLI command examples
- programmatic-usage.ts: Library usage in TypeScript
- docker-compose.yml: Docker deployment example
- agent-relay.service: Systemd service file
- README.md: Examples documentation
…:khaliqgant/agent-relay into claude/review-pr-9-6HyEY
@khaliqgant khaliqgant merged commit 152bcdf into claude/multi-project-agent-sockets-RCkNs Dec 23, 2025
@khaliqgant khaliqgant deleted the claude/review-pr-9-6HyEY branch December 23, 2025 11:05
khaliqgant added a commit that referenced this pull request Apr 1, 2026
template-resolver.ts: shell-escape interpolated variables (CRITICAL #1)
broker_tests.rs: uncomment and wire up 5 real tests (CRITICAL #2)
worker_tests.rs: uncomment and wire up 5 real tests (CRITICAL #3)
worker.rs: log bypass-flag injection, add .. path traversal rejection (CRITICAL #4, #7)
verification.ts: export stripInjectedTaskEcho, add path traversal guard (CRITICAL #5)
runner.ts: remove duplicate stripInjectedTaskEcho, add ENV_ALLOWLIST filtering (HIGH #17)
channel-messenger.ts: add secret scrubbing, hoist regex constants (MEDIUM #27, #28)
process-spawner.ts: add settled guard for race condition (MEDIUM #23)
step-executor.ts: add sideEffects to callback type, deprecate alias (HIGH #15, #16)
index.ts: export StepExecutor directly (MEDIUM #29)
workflows/refactor/*.ts: replace hardcoded paths, remove --no-verify (HIGH #8-11)
broker.rs: move is_pid_alive to canonical location (HIGH #14)
cost/tracker.ts: add restrictive file permissions (MEDIUM #30)
cost/pricing.ts: add last-verified date (MEDIUM #31)
verification.test.ts: 9 new tests for exported helpers (MEDIUM #32)

Co-Authored-By: My Senior Dev <dev@myseniordev.com>
khaliqgant added a commit that referenced this pull request Apr 6, 2026
…#675)

* refactor: TDD decomposition of runner.ts + main.rs with extracted modules

Extracted 5 modules from runner.ts (6,878 lines):
- verification.ts (143 lines)
- template-resolver.ts (87 lines)
- channel-messenger.ts (151 lines)
- step-executor.ts (571 lines)
- process-spawner.ts (96 lines)

Added characterization tests for all extracted modules.
Extracted broker.rs and worker.rs from main.rs.

Bug fixes:
- Restore stripInjectedTaskEcho in verification.ts
- Guard agent.release() against broker 400 race condition
- Fix run-summary-table test for new table format
- Export normalizeModel for correct pricing resolution
- Fix --wave argument parsing in run-refactor.ts
- ESM imports in all workflow files

* fix: address 10 review finding(s)

tracker.ts: resolveModel now uses normalizeModel for alias resolution (pre-existing fix verified)
run-refactor.ts: --wave parsing with proper validation (pre-existing fix verified)
step-executor.ts: signal-killed processes now correctly treated as failures
channel-messenger.ts: replaced ReDoS-vulnerable regex with iterative indexOf stripping
runner.ts: eliminated shell injection by using direct git spawn with argument arrays
process-spawner.ts: fixed SIGKILL fallback timer leak by storing and clearing reference

Co-Authored-By: My Senior Dev <dev@myseniordev.com>

* Revert "chore: gitignore .trajectories/ (automated run artifacts) (#676)" (#677)

This reverts commit 07a8dc0.

* refactor: TDD decomposition of runner.ts + main.rs with extracted modules

Extracted 5 modules from runner.ts (6,878 lines):
- verification.ts (143 lines)
- template-resolver.ts (87 lines)
- channel-messenger.ts (151 lines)
- step-executor.ts (571 lines)
- process-spawner.ts (96 lines)

Added characterization tests for all extracted modules.
Extracted broker.rs and worker.rs from main.rs.

Bug fixes:
- Restore stripInjectedTaskEcho in verification.ts
- Guard agent.release() against broker 400 race condition
- Fix run-summary-table test for new table format
- Export normalizeModel for correct pricing resolution
- Fix --wave argument parsing in run-refactor.ts
- ESM imports in all workflow files

* trajectories correction again

* pre commit is executable

* remove tracked workflows

* fix: address 36 review findings across Rust and TypeScript modules

template-resolver.ts: shell-escape interpolated variables (CRITICAL #1)
broker_tests.rs: uncomment and wire up 5 real tests (CRITICAL #2)
worker_tests.rs: uncomment and wire up 5 real tests (CRITICAL #3)
worker.rs: log bypass-flag injection, add .. path traversal rejection (CRITICAL #4, #7)
verification.ts: export stripInjectedTaskEcho, add path traversal guard (CRITICAL #5)
runner.ts: remove duplicate stripInjectedTaskEcho, add ENV_ALLOWLIST filtering (HIGH #17)
channel-messenger.ts: add secret scrubbing, hoist regex constants (MEDIUM #27, #28)
process-spawner.ts: add settled guard for race condition (MEDIUM #23)
step-executor.ts: add sideEffects to callback type, deprecate alias (HIGH #15, #16)
index.ts: export StepExecutor directly (MEDIUM #29)
workflows/refactor/*.ts: replace hardcoded paths, remove --no-verify (HIGH #8-11)
broker.rs: move is_pid_alive to canonical location (HIGH #14)
cost/tracker.ts: add restrictive file permissions (MEDIUM #30)
cost/pricing.ts: add last-verified date (MEDIUM #31)
verification.test.ts: 9 new tests for exported helpers (MEDIUM #32)

Co-Authored-By: My Senior Dev <dev@myseniordev.com>

* style: auto-format Rust code with cargo fmt

* minor clean

* fix: reinstate deleted workflow files into workflows/ci/

Moved fix-mcp-spawn.yaml, add-swift-sdk.ts, and cli-observability.ts
into workflows/ci/ to clearly distinguish them as CI test suite
workflows. Updated .gitignore to allow workflows/ci/ and workflows/refactor/.

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

* fix: address remaining Devin review findings and fix failing test

- Fix tracker test: expect mode: 0o700 in mkdirSync assertion
- Use Object.hasOwn() instead of `in` operator to avoid prototype chain false positives
- Use Promise.allSettled to preserve partial output on process timeout
- Apply path containment check for absolute paths in checkFileExists

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

* fix: address new Devin review findings — StepExecutor name collision and cwd trailing slash

- Rename StepExecutor interface in runner.ts to RunnerStepExecutor to avoid
  shadowing the StepExecutor class export in the barrel index
- Normalize cwd with path.resolve() in checkFileExists to handle trailing slashes

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

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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