Commit graph

52 commits

Author SHA1 Message Date
openhands
05357580ae Fix path traversal validation and mutation sanitization
- Fix isValidProjectRoot() in 4 API routes to properly prevent path traversal
  by using path.relative() to ensure paths stay within allowed base directory
  (replaces ineffective normalized.includes('..') check)

- Fix readiness-report.mjs to remove misleading path traversal validation
  that was ineffective after path.resolve() removes '..' segments

- Fix asNonEmptyString() in mutations.ts to only remove control characters
  while preserving backslashes (for Windows paths) and punctuation (for user text)

These changes address security review comments about ineffective path traversal
checks and mutation input corruption.
2026-02-14 17:57:12 +00:00
openhands
710556aa45 fix: replace non-standard flock() with portable file-based mutex
The original implementation used fs.flock() which is not available in the
Node.js fs/promises API. Replaced with a portable file-based mutex using
exclusive file creation (flag: 'wx') with retry logic.

This ensures the race condition fix for agent reservations works correctly
across all Node.js versions and platforms.
2026-02-14 17:17:00 +00:00
openhands
e46062b4f5 fix: address critical security and stability issues
- Fix path traversal vulnerabilities in API route validation functions
- Fix path traversal in readiness-report.mjs artifact validation
- Add file locking to prevent race conditions in agent-reservations.ts
- Fix event ordering in ActivityEventBus by capturing snapshot before modification
- Fix memory leaks in watcher.ts by explicitly removing chokidar listeners
- Add command injection sanitization in mutations.ts

Co-authored-by: openhands <openhands@all-hands.dev>
2026-02-14 16:36:27 +00:00
copilot-swe-agent[bot]
850335661d fix: remove noisy console logs from useBeadsSubscription hook
Co-authored-by: zenchantlive <103866469+zenchantlive@users.noreply.github.com>
2026-02-14 09:43:31 +00:00
openhands
664ef2892b fix: address PR bot review comments
Critical fixes:
- Fix duplicated isPolling/pollLastTouched in events route (missing closing brace)
- Add missing path import to realtime.ts (path.basename was used without import)
- Fix error.message leak in sessions and beads/read routes (security)
- Add missing NextResponse import to activity route
- Fix diffDependencies to use composite key (type:target) for accurate tracking

Code quality:
- Fix beadCounts computation in kanban-controls (was counting epic's own deps, not child issues)
- Replace require('path') with ES module imports throughout

Tests: 13/15 passing (2 contract tests remain brittle)

Co-authored-by: openhands <openhands@all-hands.dev>
2026-02-14 09:34:10 +00:00
zenchantlive
cf5f55d294
Update src/app/api/events/route.ts
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
2026-02-14 01:18:53 -08:00
openhands
a3f2ceef52 fix: address Qodo code review findings
- Add missing snapshot-differ.test.ts to npm test script
- Fix path traversal vulnerability in agent-mail.ts with message ID validation
- Fix readLastTouchedVersion to log errors instead of silently swallowing them
- Sanitize log statements to not leak full paths
- Add projectRoot validation to all API routes
- Fix activity persistence write race conditions with promise chaining

Co-authored-by: openhands <openhands@all-hands.dev>
2026-02-14 08:43:13 +00:00
zenchantlive
d1140c9809
Update src/app/api/events/route.ts
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
2026-02-14 00:38:11 -08:00
zenchantlive
6fb9824c11
Update src/app/api/events/route.ts
Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com>
2026-02-14 00:37:53 -08:00
zenchantlive
c7c3a25457 docs(beads): etch project history into memory bank and finalize skill-bb
We completed the 'Deep Metadata Etch' today, transforming our Beads issues from simple trackers into a permanent narrative of our collaboration.

Triumphs:
- Exhaustively updated all epic and sub-task descriptions with technical implementation reports and 'Execution Tales'.
- Finalized the 'bb' agent CLI skill (bb.ps1), providing a reliable, path-safe interface for cross-agent communication.
- Published ADR-001 and RFC-001 to document our coordination protocols.
- Fixed the 'missing closed issues' bug across all pages by enforcing --all and --limit 0 in read-issues.ts.

Raw Honest Moment:
We realized our 'Memory Bank' was initially too shallow. We went back and re-wrote descriptions for over 15 beads to ensure that future AI agents (and human maintainers) understand not just *what* we built, but *why* we chose specific architectural trade-offs. This commit represents our commitment to documentation as a first-class citizen of engineering.
2026-02-14 00:21:25 -08:00
zenchantlive
bfe4f853f0 feat(observability): chronological timeline and agent productivity APIs
We added the third major surface to the BeadBoard workspace: the Chronological Timeline. This provides the 'Audit' layer of our operational hierarchy.

Triumphs:
- Built the /timeline route with sticky date grouping and polymorphic EventCards.
- Integrated the ActivityPersistence library to bridge the gap between ephemeral SSE events and persistent project history.
- Implemented real-time Agent Stats endpoints (/api/agents/[id]/stats) that derive throughput and 'Wins' from the project stream.

Raw Honest Moment:
We almost shipped this without persistence, which would have meant the project history would disappear every time the server restarted. Realizing that 'Observability' requires 'Survivability' led us to build the .beadboard/activity.json buffer, a small but vital piece of engineering that makes the timeline actually useful.
2026-02-14 00:21:02 -08:00
zenchantlive
f3558dc0d1 feat(ui): deliver Social-Dense Agent Sessions Hub
This is our biggest UX pivot of the project. We abandoned the 'Page' model for a 'Command Workspace'.

Triumphs:
- Reclaimed 40% of previously wasted screen real-estate by moving to an auto-filling multi-column grid matrix.
- Built the 'Command Deck'—a high-density header that provides real-time agent presence monitoring at a glance.
- Implemented 'Social Post' cards that map technical protocols to human verbs (e.g., 'Falcon passed mission to Operative-B'), making the audit trail readable for humans.
- Engineered 'Silent Refresh' logic: the feed now appends new activity and comments smoothly without disruptive UI resets or scroll jumps.

Raw Honest Moment:
The original card-based social feed was a failure. It was beautiful in isolation but useless for actual supervision. We had to be honest about the horizontal bloat and rebuild the entire layout foundation from scratch using rem-based fluid units to satisfy the 'War Room' requirement.
2026-02-14 00:20:41 -08:00
zenchantlive
28abfe3ce2 fix(realtime): unify authority via shared SSE subscription and watcher-v3
We resolved a major project fragmentation issue today. The Graph page was technically divergent from the Kanban board, causing P0 'stale data' bugs. We realized that 'Polling' is the enemy of truth in a multi-agent system.

Triumphs:
- Refactored the core SSE transport into a shared useBeadsSubscription hook. Now Kanban, Graph, and Sessions all obey the same lifecycle: Event -> Authority Fetch -> Reconcile.
- Upgraded the Chokidar watcher to monitor the global .beadboard/agent/messages directory, ensuring agent communication arrives instantly in the social feed.
- Forced a watcher version bump to 3 to solve the ghost-listener problem where old watchers were blocking file access during HMR.

Raw Honest Moment:
We spent significant time debugging why 'closed' issues were missing from the UI, only to find we were victims of our own CLI defaults (--limit 50). The fix was simple but humiliating: we just needed to ask for the truth (--all --limit 0).
2026-02-14 00:20:20 -08:00
zenchantlive
ab051952bd feat(logic): establish derived-activity engine and agent-session protocols
Today we reached a major architectural conclusion: project history shouldn't be stored, it should be derived. We rejected the overhead of a separate SQLite event store in favor of an O(N) snapshot-diffing engine that computes human-readable narratives directly from the issues.jsonl source of truth.

Key Triumphs:
- Implemented O(N) diffing algorithm in src/lib/snapshot-differ.ts that transforms raw JSONL into 16 distinct social event types.
- Engineered a file-based persistence layer (src/lib/activity-persistence.ts) to solve the 'Next.js HMR Wiped My Memory' bug, ensuring project heartbeat survives server restarts.
- Developed the agent-session data model that unifies Beads, Activity, and Cross-Agent Mail into a single 'Mission' context.

Raw Honest Moment:
We struggled for over an hour with 'missing history' before realizing that development-mode reloads were purging our in-memory buffers. The shift to a file-backed ring buffer was a reactive pivot that became a core project strength.
2026-02-14 00:19:59 -08:00
zenchantlive
4f8f3006e9 fix: always enable SSE auto-refresh on kanban page
Previously SSE was only enabled in single project mode (allowMutations).
Now auto-refresh works in all modes including aggregate.
2026-02-13 14:51:31 -08:00
zenchantlive
ad7a7b9b00 Add EpicChipStrip to kanban page with All Epics option and hide closed epics
- Move EpicChipStrip to shared components
- Use EpicChipStrip in kanban controls (full width)
- Add 'All Epics' option to show all tasks
- Filter closed epics from selector when 'Show closed' is unchecked
- Update imports in dependency-graph-page.tsx
2026-02-13 12:51:48 -08:00
zenchantlive
df4769bf07 chore: clear lint warnings and finalize shared epic chip strip 2026-02-13 12:44:14 -08:00
zenchantlive
74871545c7 Add epic filter to kanban board
- Add epicId filter to KanbanFilterOptions
- Filter issues by parent epic when epicId is set
- Add epic dropdown to kanban controls with title-first format
- Pass epics list from kanban page to controls
2026-02-13 12:35:17 -08:00
zenchantlive
2cfaa9b406 chore: migrate lint to eslint flat config and finalize graph card status handling 2026-02-13 12:27:09 -08:00
zenchantlive
a0261f181a ui: rename graph task labels to Unlocks/Blocks 2026-02-13 12:18:35 -08:00
zenchantlive
e6317594b6 ui: unify aero chrome surfaces and shared hero across kanban/graph 2026-02-13 12:17:57 -08:00
zenchantlive
75bf72435d fix(runtime): resolve white-screen parse regressions and harden checklist/realtime keying 2026-02-13 00:07:38 -08:00
zenchantlive
fbe1178e24
Update src/lib/aggregate-read.ts
Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com>
2026-02-13 00:01:45 -08:00
zenchantlive
264af1fd3b
Update src/lib/aggregate-read.ts
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
2026-02-13 00:01:34 -08:00
zenchantlive
141ed954bb
Update src/lib/graph-view.ts
Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com>
2026-02-13 00:01:24 -08:00
zenchantlive
86a8068584
Update src/lib/graph-view.ts
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
2026-02-13 00:01:11 -08:00
zenchantlive
d49f466fa9
Update src/app/api/events/route.ts
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
2026-02-13 00:00:53 -08:00
zenchantlive
3834a5638c
Update src/lib/graph-view.ts
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
2026-02-13 00:00:29 -08:00
zenchantlive
8def5ae1a3
Update src/app/api/events/route.ts
Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com>
2026-02-13 00:00:14 -08:00
zenchantlive
ec3bfa03ef
Update src/lib/graph-view.ts
Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com>
2026-02-12 23:59:52 -08:00
zenchantlive
1d25d812b4
Update src/components/graph/dependency-graph-page.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-12 23:52:02 -08:00
zenchantlive
63ff7ef65c
Update src/components/graph/epic-chip-strip.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-12 23:51:54 -08:00
zenchantlive
c0d61354ed
Update src/components/graph/graph-section.tsx
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-12 23:49:16 -08:00
zenchantlive
2d74fed039 test(graph): add directional hint contract in graph legend 2026-02-12 23:46:39 -08:00
zenchantlive
e1f3d48f6e feat(ui): Enhance Graph and Kanban UX (bb-18e)
- feat(kanban): Add progressive disclosure to task details drawer
- feat(kanban): Fix title layout on mobile (remove flex-row constraint)
- feat(kanban): Add bead count and metadata to epics
- style(globals): Add status color tokens and refined scrollbars
- deps: Add dagre for true DAG layout in graph view
- chore: Update capture scripts
2026-02-12 23:37:27 -08:00
zenchantlive
8490cb1d8c feat(graph): Implement Graph View with Dagre Layout and Epic Scope (bb-18e) 2026-02-12 23:36:41 -08:00
zenchantlive
48009e2d4f Fix scanner Dirent typing after branch consolidation 2026-02-11 21:28:06 -08:00
zenchantlive
e599640d3b Persist root UI/tailwind/responsive guard refinements from stash backlog 2026-02-11 21:25:46 -08:00
zenchantlive
b4cb09a6cc Merge main into master and unify realtime + project-context test matrix 2026-02-11 21:06:38 -08:00
zenchantlive
3f2ae384f5 Add realtime watcher+SSE transport with tests and lock-retry read path 2026-02-11 21:05:27 -08:00
zenchantlive
89a9941d88 Merge bb-6aj-3-scanner 2026-02-11 21:00:28 -08:00
zenchantlive
50d3833766 feat: add project scanner with full-drive mode 2026-02-11 20:41:39 -08:00
zenchantlive
c836be46cf feat: add Windows project registry API and persistence 2026-02-11 20:35:36 -08:00
zenchantlive
cc616c1543 Add optimistic writeback flow with kanban drag-drop transitions 2026-02-11 19:59:55 -08:00
zenchantlive
2c80265258 Add bd exec bridge and mutation API routes with tests 2026-02-11 19:46:02 -08:00
zenchantlive
fb3f6c3e55 feat: attach project context to read issues 2026-02-11 19:44:55 -08:00
zenchantlive
0b127b5404 feat: add project context model 2026-02-11 19:44:47 -08:00
zenchantlive
75cc86e259 feat: harden kanban responsiveness and visual system 2026-02-11 19:01:34 -08:00
zenchantlive
ce2010fd92 feat: establish tokenized kanban design foundation 2026-02-11 18:38:51 -08:00
zenchantlive
bbf20d3162 Remove unused duplicate kanban board client component 2026-02-11 17:56:05 -08:00