Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
e197c34
feat: add local ReflexionGraph component and unified artifact state
bencoleman-au Jan 14, 2026
9e6aa56
Merge feature/kg-artifact: add local ReflexionGraph component
bencoleman-au Jan 14, 2026
efe52dc
feat: add production deployment config with Docker, Railway, and heal…
bencoleman-au Jan 15, 2026
a8cbf57
fix: set HOSTNAME=0.0.0.0 for Next.js standalone and increase health …
bencoleman-au Jan 15, 2026
f3f2601
Fix HITL resume payload and resolve build/lint errors in messages com…
bencoleman-au Jan 15, 2026
f54c237
Feature: Product Interaction Panel, Enterprise Branding System, and R…
bencoleman-au Jan 16, 2026
36810c5
fix(frontend): robust streaming support and error handling
bencoleman-au Jan 17, 2026
ed88c48
feat: implement google social auth, user menu, and protected routes
bencoleman-au Jan 17, 2026
e9ae314
Remove forced Daikin branding from login page
bencoleman-au Jan 17, 2026
4bf5461
feat: add feature request api and tab integration
bencoleman-au Jan 17, 2026
4e5a84c
feat: add backlog tab and issues api
bencoleman-au Jan 18, 2026
a4a5451
chore: update pnpm-lock.yaml to fix frozen lockfile build error
bencoleman-au Jan 18, 2026
b57209d
feat(rbac): fetch user role and organization from backend profile end…
bencoleman-au Jan 18, 2026
44eaf71
fix(rbac): ensure UI sync works via local fallback and robust backend…
bencoleman-au Jan 18, 2026
9c4dae1
feat(workbench): implement KG Workbench Shell with RBAC sidebar, Worl…
bencoleman-au Jan 18, 2026
ba21043
fix(workbench): wrap search-params dependent components in Suspense t…
bencoleman-au Jan 18, 2026
15daba2
fix(auth): improve backend URL resilience and propagate user email in…
bencoleman-au Jan 19, 2026
db2c591
feat(workbench): implement interactive KG visualization and Admin Org…
bencoleman-au Jan 19, 2026
c0e0b80
fix(build): remove package-lock.json and update pnpm-lock.yaml for Ra…
bencoleman-au Jan 19, 2026
bba0949
fix(build): remove package-lock.json from repository
bencoleman-au Jan 19, 2026
d96b351
fix(build): correct Button import and cleanup unused variables to fix…
bencoleman-au Jan 19, 2026
0c42473
fix(auth): use local proxy for authenticated organization fetch
bencoleman-au Jan 19, 2026
bcf460d
security(auth): include API key in profile lookup for secured backend…
bencoleman-au Jan 19, 2026
4f9f306
feat: integrated workbench shell enhancements
bencoleman-au Jan 19, 2026
ef6dcc6
fix: add missing use client directives
bencoleman-au Jan 19, 2026
16effe6
fix: wrap layout providers in Suspense
bencoleman-au Jan 19, 2026
29ecc12
fix: resolve Next.js 15 prerendering and toaster client directive
bencoleman-au Jan 19, 2026
f27ee71
Fix: Next.js 15 build errors and LangGraph connection issues (URL nor…
bencoleman-au Jan 20, 2026
2cf329b
feat: restructure IA to project-centric layout and fix artifact display
bencoleman-au Jan 20, 2026
bf2f425
fix: implement auto-refresh for backend idToken to prevent expiry errors
bencoleman-au Jan 20, 2026
a384501
fix(kg-viz): implement is_active transparency for focus mode and add …
bencoleman-au Jan 20, 2026
cb731e1
fix(kg-viz): implement is_active transparency for focus mode and add …
bencoleman-au Jan 20, 2026
28101ed
fix: resolve HITL UI visibility and race condition issues
bencoleman-au Jan 21, 2026
b790056
fix: persist refreshed session tokens to localStorage
bencoleman-au Jan 21, 2026
d9279c1
fix: use fresh session token in ThreadProvider directly to avoid race…
bencoleman-au Jan 21, 2026
16d1e40
fix(ui): allow manual view switching to override backend state
bencoleman-au Jan 21, 2026
d31a41e
feat(ui): bidirectional workbench view sync
bencoleman-au Jan 21, 2026
d92616e
feat(workbench): restore KG history panel and time travel UI
bencoleman-au Jan 21, 2026
2d94ab0
feat(workbench): implement bidirectional view synchronization
bencoleman-au Jan 21, 2026
18844e8
feat: Add adjustable transparency control for inactive nodes in map view
bencoleman-au Jan 22, 2026
f76f418
feat(workbench): implement version comparison feature in world map view
bencoleman-au Jan 22, 2026
b4c713f
Add organization management UI and make Settings an official workbenc…
bencoleman-au Jan 22, 2026
663cfde
docs: Add v1.4.0 release notes for administrative control and observa…
bencoleman-au Jan 22, 2026
362e939
feat: Remove setup page - use environment variables and defaults auto…
bencoleman-au Jan 22, 2026
a2ed2a6
fix: Improve error handling for organization and branding API calls
bencoleman-au Jan 22, 2026
b56ddac
Fix: Add req parameter to GET handlers to prevent body read errors in…
bencoleman-au Jan 22, 2026
fc7322e
feat: Add OpenTelemetry client-side tracing with LangSmith integration
bencoleman-au Jan 23, 2026
67ddd57
feat: PDF document upload with authentication (#11)
bencoleman-au Jan 23, 2026
cc6c6b4
Fix connection failures and URL parameter issues
bencoleman-au Jan 23, 2026
d3210ce
Fix localhost errors and body reading issues in staging
bencoleman-au Jan 23, 2026
0449cf1
Fix LangGraph server connection in production
bencoleman-au Jan 23, 2026
991ddff
Optimize frontend build performance for Railway
bencoleman-au Jan 23, 2026
11ebd2f
fix: remove Docker cache mounts incompatible with Railway build system
bencoleman-au Jan 23, 2026
4bbe9ab
fix: use REFLEXION_JWT_SECRET for backend JWT token signing
bencoleman-au Jan 23, 2026
aa82a48
Fix: Remove passthrough apiKey config to forward client JWT token
bencoleman-au Jan 23, 2026
353a90f
Fix: Replace passthrough with custom proxy to forward client JWT token
bencoleman-au Jan 23, 2026
0e1e2a5
feat: Move enrichment approval to workbench view and improve layout
bencoleman-au Jan 26, 2026
991f625
docs: Add release notes for v1.5.0 - Enrichment Approval Workbench
bencoleman-au Jan 26, 2026
d371205
fix: TypeScript error in useQueryState serialize function
bencoleman-au Jan 26, 2026
569db85
docs: Update v1.5.0 release notes to highlight Issue #12 major features
bencoleman-au Jan 26, 2026
66b1a65
docs: Update v1.5.0 release notes with Issue #12 user story as lede
bencoleman-au Jan 26, 2026
bfe1eab
docs: Update v1.5.0 release notes with user story and business value
bencoleman-au Jan 26, 2026
3a3e754
feat: Convert release notes from JSON to Markdown format
bencoleman-au Jan 26, 2026
0f636e5
fix: Add 'enrichment' as valid workbench view type
bencoleman-au Jan 26, 2026
7e60375
fix: Remove label property access from Node type in world-map-view
bencoleman-au Jan 26, 2026
b7c307e
fix: Bypass Next.js proxy for file uploads (multipart/form-data)
bencoleman-au Jan 26, 2026
4a0b5c2
fix: Switch enrichment trigger from FormData to JSON endpoint
bencoleman-au Jan 26, 2026
9c69023
fix: Use getDirectBackendUrl helper in uploadDocument to fix proxy by…
bencoleman-au Jan 26, 2026
61ad1cc
fix: Use getDirectBackendUrl helper in uploadDocument and add compreh…
bencoleman-au Jan 26, 2026
30f83da
fix: Bypass Next.js proxy for enrichment API calls to prevent 404 errors
bencoleman-au Jan 26, 2026
568d6b3
fix: Agent chat panel height constraint to prevent off-screen content
bencoleman-au Jan 26, 2026
0d523e4
fix: Improve error handling in /api/issues route
bencoleman-au Jan 26, 2026
070e3af
feat: Phase 1 Architecture NodeDetailView implementation (Issue #16)
bencoleman-au Jan 26, 2026
4b5b5e2
Merge pull request #1 from bcolemanau/feature/issue-16-architecture-d…
bcolemanau Jan 26, 2026
0d0a025
fix: Home page redirect to workbench and chat input viewport issues
bencoleman-au Jan 26, 2026
fc158a6
fix: ESLint errors in shell.tsx - add void to reflow expressions
bencoleman-au Jan 26, 2026
60b2848
fix: chat input overflow by switching to flex layout instead of absol…
bencoleman-au Jan 26, 2026
df42f5e
fix: remove absolute positioning from StickyToBottomContent to fix ch…
bencoleman-au Jan 26, 2026
823c255
fix: add stricter height constraints to prevent chat input overflow
bencoleman-au Jan 26, 2026
ea60760
fix: account for header height in agent chat panel content area
bencoleman-au Jan 26, 2026
1dc9270
Fix chat input being obscured and improve RRWeb recording button
bencoleman-au Jan 27, 2026
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
21 changes: 20 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
node_modules
.next
.git
.env
.env
.env.local
.env*.local
.DS_Store
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
coverage
.nyc_output
.vscode
.idea
*.swp
*.swo
*~
dist
build
.cache
.turbo
73 changes: 73 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Stage 1: Dependencies
FROM node:20-slim AS deps
WORKDIR /app

# Install pnpm globally (cached layer)
RUN npm install -g pnpm@10.5.1

# Copy only package files first for better caching
COPY package.json pnpm-lock.yaml* ./

# Install dependencies
# Railway's native build cache will cache this layer if package files don't change
RUN pnpm install --frozen-lockfile

# Stage 2: Builder
FROM node:20-slim AS builder
WORKDIR /app

# Install pnpm globally (cached layer)
RUN npm install -g pnpm@10.5.1

# Copy dependencies from deps stage
COPY --from=deps /app/node_modules ./node_modules

# Copy package files
COPY package.json pnpm-lock.yaml* ./

# Copy source files (this should be after node_modules for better caching)
COPY . .

# Accept build arguments for NEXT_PUBLIC_ environment variables
ARG NEXT_PUBLIC_LANGSMITH_API_KEY
ARG NEXT_PUBLIC_LANGSMITH_ENDPOINT
ARG NEXT_PUBLIC_LANGSMITH_PROJECT

# Set environment variables for build
ENV NEXT_PUBLIC_LANGSMITH_API_KEY=${NEXT_PUBLIC_LANGSMITH_API_KEY}
ENV NEXT_PUBLIC_LANGSMITH_ENDPOINT=${NEXT_PUBLIC_LANGSMITH_ENDPOINT}
ENV NEXT_PUBLIC_LANGSMITH_PROJECT=${NEXT_PUBLIC_LANGSMITH_PROJECT}

# Set NODE_ENV for faster builds
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1

# Build the application
# Railway's native build cache will cache this layer when source code doesn't change
RUN pnpm run build

# Stage 3: Runner
FROM node:20-slim AS runner
WORKDIR /app

ENV NODE_ENV=production

# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED=1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

ENV PORT=3000
ENV HOSTNAME="0.0.0.0"

CMD ["node", "server.js"]
33 changes: 33 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Development Dockerfile for Next.js
FROM node:20-slim

WORKDIR /app

# Install pnpm globally
RUN npm install -g pnpm@10.5.1

# Copy package files
COPY package.json pnpm-lock.yaml* ./

# Install dependencies (including dev dependencies)
RUN pnpm install

# Accept build arguments for NEXT_PUBLIC_ environment variables
ARG NEXT_PUBLIC_LANGSMITH_API_KEY
ARG NEXT_PUBLIC_LANGSMITH_ENDPOINT
ARG NEXT_PUBLIC_LANGSMITH_PROJECT

# Set environment variables
ENV NEXT_PUBLIC_LANGSMITH_API_KEY=${NEXT_PUBLIC_LANGSMITH_API_KEY}
ENV NEXT_PUBLIC_LANGSMITH_ENDPOINT=${NEXT_PUBLIC_LANGSMITH_ENDPOINT}
ENV NEXT_PUBLIC_LANGSMITH_PROJECT=${NEXT_PUBLIC_LANGSMITH_PROJECT}

# Set NODE_ENV to development
ENV NODE_ENV=development
ENV NEXT_TELEMETRY_DISABLED=1

# Expose the dev server port
EXPOSE 3000

# Run dev server (source code will be mounted as volume)
CMD ["pnpm", "dev"]
219 changes: 219 additions & 0 deletions FEATURE_REQUEST_UNIFIED_APPROVALS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# Feature Request: Unified Approvals Inbox

## Business Value

**Problem Statement:**
Currently, users must navigate between different parts of the application to handle various types of approvals:
- **Enrichment approvals** are shown in the Enrichment workbench view
- **HITL interrupts** (like project classification) are shown in the agent chat thread
- **No centralized visibility** into all pending approvals across the system
- **No notification system** to alert users when approvals are waiting

This fragmentation creates friction in the approval workflow, leading to:
- Delayed project starts (users miss classification approvals)
- Incomplete artifact enrichment (users miss enrichment approvals)
- Reduced productivity (users must check multiple locations)
- Poor visibility into pending work

**Business Impact:**
- **Faster project onboarding**: Centralized approvals reduce time-to-first-action
- **Improved completion rates**: Better visibility leads to fewer missed approvals
- **Enhanced user experience**: Single location for all approval tasks
- **Reduced support burden**: Clearer workflow reduces user confusion

---

## User Stories

### Epic: Unified Approvals Experience

#### Story 1: As a project manager, I want to see all pending approvals in one place
**Priority:** High
**Acceptance Criteria:**
- [ ] All enrichment proposals appear in the Enrichment inbox
- [ ] All HITL interrupts (classify_intent, etc.) appear in the Enrichment inbox
- [ ] Approvals are clearly categorized by type
- [ ] I can see the total count of pending approvals at a glance

**Business Value:** Reduces cognitive load and ensures no approvals are missed

---

#### Story 2: As a user, I want to be notified when approvals are waiting
**Priority:** High
**Acceptance Criteria:**
- [ ] A notification badge appears on the "Enrichment" tab showing the count of pending approvals
- [ ] The badge updates in real-time as approvals are added or resolved
- [ ] The badge is visually prominent (red/orange) when count > 0
- [ ] The count includes both enrichment proposals and HITL interrupts

**Business Value:** Proactive notification ensures timely action on approvals

---

#### Story 3: As a user, I want the system to automatically show me the approvals inbox when new approvals arrive
**Priority:** Medium
**Acceptance Criteria:**
- [ ] When a new enrichment proposal is created, the UI automatically switches to the Enrichment view
- [ ] When a HITL interrupt occurs (e.g., classify_intent), the UI automatically switches to the Enrichment view
- [ ] Auto-switching only occurs if the user is not already on the Enrichment view
- [ ] The user can manually navigate away if desired

**Business Value:** Reduces friction by bringing approvals to the user's attention immediately

---

#### Story 4: As a user, I want to approve or reject different types of approvals using a consistent interface
**Priority:** High
**Acceptance Criteria:**
- [ ] Enrichment approvals show artifact metadata and allow artifact type selection
- [ ] HITL approvals (classify_intent) show project classification preview and allow approve/reject/edit
- [ ] Both types use consistent UI patterns (cards, buttons, status indicators)
- [ ] I can process multiple approvals in sequence without leaving the inbox

**Business Value:** Consistent experience reduces learning curve and improves efficiency

---

#### Story 5: As a user, I want to see the status of my approval actions
**Priority:** Medium
**Acceptance Criteria:**
- [ ] Approved items show a success indicator
- [ ] Rejected items show a rejection indicator
- [ ] Processing states show loading indicators
- [ ] Error states show clear error messages

**Business Value:** Clear feedback builds confidence in the system

---

## Technical Requirements

### Frontend Changes

1. **Extend EnrichmentView Component**
- Add HITL interrupt handling alongside enrichment proposals
- Create unified `ApprovalItem` type with discriminator
- Hook into `stream.interrupt` from stream context
- Display both types in a unified list

2. **Create Unified Approval Interface**
- `ApprovalCard` component that handles both enrichment and HITL types
- Reuse existing enrichment approval logic
- Integrate HITL approval logic (simplified from ThreadActionsView)
- Consistent styling and interaction patterns

3. **Notification Badge System**
- `useApprovalCount()` hook to calculate pending approvals
- Badge component for the Enrichment tab
- Real-time updates as approvals change

4. **Auto-Routing Logic**
- Watch for new approvals in shell.tsx
- Auto-switch to enrichment view when detected
- Respect user's current view (don't interrupt if already on enrichment)

### Backend Changes

1. **Update classify_intent Tool**
- Call `set_workbench_view("enrichment")` when creating HITL interrupt
- Ensure UI switches to enrichment view automatically

2. **Enrichment Endpoints** (no changes needed)
- Existing endpoints continue to work
- Enrichment proposals already flow to EnrichmentView

### Data Flow

```
Backend (classify_intent)
Creates HITL interrupt
Calls set_workbench_view("enrichment")
Frontend Stream Context
stream.interrupt populated
EnrichmentView detects interrupt
Displays in unified inbox
User approves/rejects
stream.submit() resolves interrupt
```

---

## Success Metrics

- **Time to First Approval**: Reduce average time from approval creation to user action
- **Approval Completion Rate**: Increase percentage of approvals that are completed (vs. abandoned)
- **User Satisfaction**: Measure via user feedback on approval workflow
- **Support Tickets**: Reduce tickets related to "missing approvals" or "where do I approve?"

---

## Implementation Phases

### Phase 1: Extend EnrichmentView (Week 1)
- Add HITL interrupt handling
- Create unified approval types
- Basic display of both types

### Phase 2: Unified UI (Week 1-2)
- Create ApprovalCard component
- Integrate HITL approval logic
- Consistent styling

### Phase 3: Notification Badge (Week 2)
- Create useApprovalCount hook
- Add badge to Enrichment tab
- Real-time updates

### Phase 4: Auto-Routing (Week 2)
- Implement auto-switch logic
- Update backend classify_intent
- Testing and refinement

---

## Dependencies

- Stream context must expose `stream.interrupt`
- EnrichmentView must be accessible from workbench
- Backend `set_workbench_view` tool must support "enrichment" view

---

## Risks & Mitigations

**Risk:** Breaking existing enrichment approval flow
**Mitigation:** Maintain backward compatibility, extensive testing

**Risk:** Performance issues with real-time updates
**Mitigation:** Optimize re-renders, use React.memo where appropriate

**Risk:** User confusion with auto-switching
**Mitigation:** Make auto-switch subtle, allow easy navigation away

---

## Future Enhancements

- Filter by approval type
- Sort by priority/date
- Bulk approve/reject
- Approval history/audit trail
- Email notifications for pending approvals
- Approval delegation/assignment

---

## Related Issues

- Issue #12: Harmonize Artifact Ingestion (enrichment approval foundation)
- Future: Approval workflow automation
- Future: Multi-user approval workflows
Loading