Skip to content

chore: CI, branch protection, issue/PR templates, README demo GIF#1

Merged
StatPan merged 5 commits intomainfrom
chore/ci-templates-readme-fixes
Apr 9, 2026
Merged

chore: CI, branch protection, issue/PR templates, README demo GIF#1
StatPan merged 5 commits intomainfrom
chore/ci-templates-readme-fixes

Conversation

@StatPan
Copy link
Copy Markdown
Owner

@StatPan StatPan commented Apr 9, 2026

What

  • GitHub Actions CI (tsc + vitest) on every PR targeting main
  • Issue templates: bug report, feature request
  • PR template with Closes #N convention
  • README: single demo.gif showing full app flow
  • Fix: agentStore missing projects/appView/activeProjectKey state
  • Fix: App.tsx prefetch /api/tree on mount so HomeScreen loads projects immediately

Why

Now that the repo is public, direct pushes to main are blocked. All changes go through PR + CI + review.

Note: This PR sets up the CI workflow itself — subsequent PRs will have the ci check enforced automatically.

Test plan

  • pnpm exec tsc --noEmit passes
  • pnpm test — 72 tests pass
  • Branch protection verified: direct push to main is rejected

StatPan added 3 commits April 8, 2026 23:23
…mo GIF

- GitHub Actions CI: tsc + vitest on every PR targeting main
- PR template enforcing issue reference (Closes #N)
- Issue templates for bug reports and feature requests
- README: replace 3 separate GIFs with single demo.gif (full flow)
- Fix: agentStore missing projects/appView/activeProjectKey state
- Fix: App.tsx prefetch /api/tree on mount so HomeScreen loads projects
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly expands the Agentree project by introducing a project-based home screen, a session sidebar, and comprehensive documentation in the README. It also adds GitHub issue and pull request templates. On the technical side, the PR improves client-side type safety for session and message handling, integrates task invocation tracking into the Zustand store, and establishes a centralized Hono server structure with robust error handling. Feedback was provided to ensure the server's error handler correctly captures and returns details for non-Error objects.

Comment thread src/server/app.ts
app.onError((err, c) => {
console.error(`[error] ${c.req.method} ${c.req.path}:`, err instanceof Error ? err.message : String(err))
const status = err instanceof Error && 'status' in err ? (err as { status: number }).status : 500
return c.json({ error: err.message ?? 'Internal Server Error' }, status as 500)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error response body currently relies solely on err.message. If the thrown error is not an instance of Error (e.g., a string or a custom object without a message property), the client will receive a generic 'Internal Server Error' even if specific error information is available. Using the same logic as the console log ensures that the actual error content is returned to the client. Additionally, using status as any is preferred over the misleading as 500 type assertion when dealing with dynamic status codes in Hono.

Suggested change
return c.json({ error: err.message ?? 'Internal Server Error' }, status as 500)
return c.json({ error: err instanceof Error ? err.message : String(err) }, status as any)

StatPan added 2 commits April 9, 2026 18:57
- CI: add separate 'Type check (client)' step for tsconfig.client.json;
  previously tsc --noEmit only checked src/server, leaving all client
  errors invisible
- agentStore: export TaskInvocation and ActiveProjectKey; add hasParent,
  detached, taskCount, pendingTaskCount, incomingTask to AgentNodeData;
  populate them in buildGraph (detach/reattach button was always hidden
  because hasParent/detached were never set); add detached to
  SessionInfo.canvas so session.canvas?.detached is not always undefined
- SessionPanel: remove { type: string } catch-all from MessagePart union;
  it was a supertype of all variants, blocking TypeScript narrowing in
  every if (part.type === '...') branch; replace with explicit step-start
  and snapshot variants
- App: add try/catch to refreshTree so initial-load errors are logged
Commit the complete working state that was on disk but never staged:
- HomeScreen, ProjectTabBar, SessionListSidebar (new client components)
- src/server/routes/project.ts (was imported by app.ts but missing from git)
- drizzle migrations 0003–0005 (task_invocation, detach, projects)
- broadcaster.test.ts, real-opencode integration test, vitest.opencode.config
- Updated AgentCanvas, AgentEdge, AgentNode, SubtaskDialog, agentStore
- Updated server db schema/index, session/canvas/tree/system routes,
  compat adapter, types, index
@StatPan StatPan merged commit dd79331 into main Apr 9, 2026
1 check passed
@StatPan StatPan deleted the chore/ci-templates-readme-fixes branch April 9, 2026 10:50
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.

1 participant