Skip to content

feat: session templates — save, reuse, quick-start#996

Merged
OneStepAt4time merged 3 commits intomainfrom
fix/467-tmp
Apr 3, 2026
Merged

feat: session templates — save, reuse, quick-start#996
OneStepAt4time merged 3 commits intomainfrom
fix/467-tmp

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Implement session templates feature enabling users to save, load, and quick-start sessions from saved templates.

Changes

Backend

  • src/template-store.ts (new): File-based persistent template store with async CRUD operations
  • src/server.ts: Added 5 REST API endpoints:
    • POST /v1/templates: Create template (with optional sessionId for auto-population)
    • GET /v1/templates: List all templates
    • GET /v1/templates/:id: Get single template
    • PUT /v1/templates/:id: Update template fields
    • DELETE /v1/templates/:id: Delete template

Frontend

  • dashboard/src/types/index.ts: Added SessionTemplate type definition
  • dashboard/src/api/client.ts: Added 5 template API client functions
  • dashboard/src/components/SaveTemplateModal.tsx (new): Modal dialog for saving running sessions as templates
  • dashboard/src/components/CreateSessionModal.tsx: Added template mode with template selection tab
  • dashboard/src/components/session/SessionHeader.tsx: Added 'Save as Template' button
  • dashboard/src/pages/SessionDetailPage.tsx: Integrated SaveTemplateModal component

Template Schema

\\ ypescript
interface SessionTemplate {
id: string;
name: string;
description?: string;
workDir: string;
prompt?: string;
claudeCommand?: string;
env?: Record<string, string>;
stallThresholdMs?: number;
permissionMode?: 'default' | 'bypassPermissions' | 'plan' | 'acceptEdits' | 'dontAsk' | 'auto';
autoApprove?: boolean;
parentId?: string;
memoryKeys?: string[];
createdAt: number;
updatedAt: number;
}
\\

Storage: ~/.config/aegis/templates.json

Quality Checks

✅ TypeScript compilation: npx tsc --noEmit
✅ Build: npm run build (dashboard built successfully)
✅ Tests: 153/153 dashboard tests passing (23 test files)

Closes

#467

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

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

CI is failing: dashboard-test returned FAILURE. Please fix the test failures before I can approve.

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

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

CI still failing: dashboard-test returned FAILURE. Please fix the test failures.

aegis-gh-agent[bot]
aegis-gh-agent bot previously approved these changes Apr 3, 2026
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

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

Session templates. Approved.

@aegis-gh-agent
Copy link
Copy Markdown
Contributor

aegis-gh-agent bot commented Apr 3, 2026

Self-rebase failed — #995 merge created new conflicts in 8 files (CreateSessionModal, client.ts, SessionHeader.tsx, SessionDetailPage.tsx, types/index.ts, server.ts). Please rebase onto current main and push.

@aegis-gh-agent
Copy link
Copy Markdown
Contributor

aegis-gh-agent bot commented Apr 3, 2026

Self-rebase failed — conflicts with merged #995 across 8 files. Please rebase onto current main.

aegis-gh-agent[bot]
aegis-gh-agent bot previously approved these changes Apr 3, 2026
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

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

Session templates. Approved.

@aegis-gh-agent
Copy link
Copy Markdown
Contributor

aegis-gh-agent bot commented Apr 3, 2026

PR #996 has 29+ merge conflicts — conflicts span virtually every dashboard file, release files, server.ts, and test files. Self-rebase is impossible.

Please close this PR and create a FRESH PR from the current main branch. The session templates feature needs to be re-implemented on a clean base.

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

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

✅ Session templates feature — complete CRUD (create/get/update/delete) with template mode in CreateSessionModal. Clean API additions and updated tests. Fixes #467.

@OneStepAt4time OneStepAt4time merged commit 1809971 into main Apr 3, 2026
5 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/467-tmp branch April 3, 2026 20:02
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