Skip to content
Draft
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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,28 @@ Run browser automation smoke checks (requires `agent-browser` CLI):
```bash
npm run test:browser:smoke
```

## Mission Control web app (Next.js + Convex)
Phase 1 implementation lives in `web/`.

Install:
```bash
cd web
npm install
```

Run:
```bash
npm run dev -- --port 4100
```
Open `http://127.0.0.1:4100`.

Web validation gates:
```bash
npm run web:convex:schema:check
npm run web:test:tasks
npm run web:test:scheduler
npm run web:test:memory
npm run web:test:e2e
npm run web:test:browser:smoke
```
63 changes: 63 additions & 0 deletions dev_plans/agentdeck-mission-control-article-alignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# AgentDeck Mission Control Article Alignment (Next.js + Convex)

Plan level: L1
Skill hook: `$planning`

## Goal
- Align the `web/` Mission Control IA and UI language to the original article structure so operators can use the same mental model directly: Tasks Board, Content Pipeline, Calendar, Memory, Team, Office.

## Scope
- In scope:
- Rename/reframe scheduler UX as `Calendar` (keep backward-compatible route alias for existing links).
- Add first-class screens for `Content Pipeline`, `Team`, and `Office`.
- Update overview page and sidebar navigation to mirror article sections.
- Update UI automation coverage (Playwright + browser smoke) for the new navigation/screen set.
- Out of scope:
- New backend schemas for pipeline/team/office in this pass.
- Replacing existing task/job/memory API contracts.

## Functional Requirements
- FR1: Home screen cards map to article sections and language.
- FR2: Sidebar contains article-aligned navigation labels and routes.
- FR3: `/calendar` is available and uses current scheduler behavior; `/scheduler` remains as compatibility redirect.
- FR4: `/content-pipeline` supports stage-based workflow editing in UI.
- FR5: `/team` shows agent roster, roles, and responsibilities with editable entries.
- FR6: `/office` visualizes active team members and work status.

## Non-Functional Requirements
- NFR1: Existing task/job/memory flows continue to work unchanged.
- NFR2: Mobile and desktop layouts remain usable.
- NFR3: UI changes are verified by both Playwright and browser automation smoke scripts.

## Current State Evidence
- Existing routes/components: `/tasks`, `/scheduler`, `/memory`, `/activity` in `/Users/thuptenwangpo/Documents/GitHub/agentdeck/web/src/app`.
- Existing e2e test only validates Tasks/Scheduler/Memory/Activity at `/Users/thuptenwangpo/Documents/GitHub/agentdeck/web/tests/e2e/mission-control.spec.ts`.
- Browser smoke still asserts `Scheduler` label in `/Users/thuptenwangpo/Documents/GitHub/agentdeck/web/scripts/browser_smoke.sh`.

## Work Breakdown
- E1: Navigation + overview realignment to article sections.
- E2: Calendar route + scheduler alias redirect.
- E3: Add content pipeline, team, and office screens/components.
- E4: Update shared styling for new boards/cards and responsive behavior.
- E5: Update and run Playwright + browser smoke tests for new paths.

## Validation / Test Plan
- `cd /Users/thuptenwangpo/Documents/GitHub/agentdeck/web && npm run lint`
- `cd /Users/thuptenwangpo/Documents/GitHub/agentdeck/web && npm run test:e2e`
- `cd /Users/thuptenwangpo/Documents/GitHub/agentdeck/web && npm run test:browser:smoke`
- `cd /Users/thuptenwangpo/Documents/GitHub/agentdeck/web && npm run build`

Pass criteria:
- New article-aligned routes render successfully.
- Existing core flows still pass e2e interactions.
- Browser smoke captures screenshot and asserts article-aligned nav labels.

## Risks & Mitigations
- Risk: Breaking existing deep links to `/scheduler`.
- Mitigation: Keep `/scheduler` as a redirect to `/calendar`.
- Risk: UI-only state for new screens may be confused as backend-persistent.
- Mitigation: Label new screens as local/pilot state in helper copy for this phase.

## Rollback
- Revert added routes/components and restore prior nav/home labels.
- Keep existing task/scheduler/memory/activity runtime untouched so rollback is low risk.
401 changes: 401 additions & 0 deletions dev_plans/agentdeck-mission-control-phase1-implementation.md

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@
"ingest:dry": "node ops_board/scripts/ingest.js --dry-run",
"snapshot": "node ops_board/scripts/snapshot.js",
"start": "node ops_board/server.js",
"start:legacy": "node ops_board/server.js",
"validate": "node ops_board/scripts/validate.js",
"test:e2e": "playwright test",
"test:e2e:headed": "playwright test --headed",
"test:browser:smoke": "bash ops_board/scripts/browser_smoke.sh"
"test:browser:smoke": "bash ops_board/scripts/browser_smoke.sh",
"web:dev": "npm --prefix web run dev -- --port 4100",
"web:lint": "npm --prefix web run lint",
"web:test:unit": "npm --prefix web run test:unit",
"web:test:tasks": "npm --prefix web run test:tasks",
"web:test:scheduler": "npm --prefix web run test:scheduler",
"web:test:e2e": "npm --prefix web run test:e2e",
"web:test:browser:smoke": "npm --prefix web run test:browser:smoke",
"web:test:memory": "npm --prefix web run test:memory -- --query-set tests/acceptance/memory-query-set.json --report reports/memory/citation-coverage.json",
"web:convex:schema:check": "npm --prefix web run convex:schema:check"
},
"dependencies": {
"better-sqlite3": "^12.6.2",
Expand Down
46 changes: 46 additions & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage
/playwright-report/
/test-results/
/reports/browser-smoke/
/reports/memory/citation-coverage.json
/reports/memory/citation-coverage.md

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
33 changes: 33 additions & 0 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AgentDeck Mission Control Web

Next.js + TypeScript Mission Control surface for phase-1 migration.

## Routes
- `/tasks` tasks board with constrained state transitions
- `/content-pipeline` stage board for ideas/scripts/thumbnail/filming/publish
- `/calendar` scheduled jobs + run-now flow
- `/memory` ingest + citation-first search
- `/team` agent roster (roles + responsibilities + focus)
- `/office` live status view of team members
- `/activity` immutable mutation timeline

## Run
```bash
npm install
npm run dev -- --port 4100
```

## Validation
```bash
npm run lint
npm run convex:schema:check
npm run test:tasks
npm run test:scheduler
npm run test:memory -- --query-set tests/acceptance/memory-query-set.json --report reports/memory/citation-coverage.json
npm run test:e2e
npm run test:browser:smoke
```

## Mode behavior
- If `CONVEX_URL` or `NEXT_PUBLIC_CONVEX_URL` is configured, API routes attempt Convex first.
- If Convex is unavailable or unauthorized, routes fall back to deterministic in-process mock mode for local verification.
59 changes: 59 additions & 0 deletions web/convex/_generated/api.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/

import type * as activity from "../activity.js";
import type * as actors from "../actors.js";
import type * as memory from "../memory.js";
import type * as scheduler from "../scheduler.js";
import type * as tasks from "../tasks.js";
import type * as utils from "../utils.js";

import type {
ApiFromModules,
FilterApi,
FunctionReference,
} from "convex/server";

declare const fullApi: ApiFromModules<{
activity: typeof activity;
actors: typeof actors;
memory: typeof memory;
scheduler: typeof scheduler;
tasks: typeof tasks;
utils: typeof utils;
}>;

/**
* A utility for referencing Convex functions in your app's public API.
*
* Usage:
* ```js
* const myFunctionReference = api.myModule.myFunction;
* ```
*/
export declare const api: FilterApi<
typeof fullApi,
FunctionReference<any, "public">
>;

/**
* A utility for referencing Convex functions in your app's internal API.
*
* Usage:
* ```js
* const myFunctionReference = internal.myModule.myFunction;
* ```
*/
export declare const internal: FilterApi<
typeof fullApi,
FunctionReference<any, "internal">
>;

export declare const components: {};
23 changes: 23 additions & 0 deletions web/convex/_generated/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/

import { anyApi, componentsGeneric } from "convex/server";

/**
* A utility for referencing Convex functions in your app's API.
*
* Usage:
* ```js
* const myFunctionReference = api.myModule.myFunction;
* ```
*/
export const api = anyApi;
export const internal = anyApi;
export const components = componentsGeneric();
60 changes: 60 additions & 0 deletions web/convex/_generated/dataModel.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/* eslint-disable */
/**
* Generated data model types.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/

import type {
DataModelFromSchemaDefinition,
DocumentByName,
TableNamesInDataModel,
SystemTableNames,
} from "convex/server";
import type { GenericId } from "convex/values";
import schema from "../schema.js";

/**
* The names of all of your Convex tables.
*/
export type TableNames = TableNamesInDataModel<DataModel>;

/**
* The type of a document stored in Convex.
*
* @typeParam TableName - A string literal type of the table name (like "users").
*/
export type Doc<TableName extends TableNames> = DocumentByName<
DataModel,
TableName
>;

/**
* An identifier for a document in Convex.
*
* Convex documents are uniquely identified by their `Id`, which is accessible
* on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
*
* Documents can be loaded using `db.get(tableName, id)` in query and mutation functions.
*
* IDs are just strings at runtime, but this type can be used to distinguish them from other
* strings when type checking.
*
* @typeParam TableName - A string literal type of the table name (like "users").
*/
export type Id<TableName extends TableNames | SystemTableNames> =
GenericId<TableName>;

/**
* A type describing your Convex data model.
*
* This type includes information about what tables you have, the type of
* documents stored in those tables, and the indexes defined on them.
*
* This type is used to parameterize methods like `queryGeneric` and
* `mutationGeneric` to make them type-safe.
*/
export type DataModel = DataModelFromSchemaDefinition<typeof schema>;
Loading