Skip to content
This repository was archived by the owner on Sep 28, 2025. It is now read-only.

Add CRUD operations to session dialog#22

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-21
Draft

Add CRUD operations to session dialog#22
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-21

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 20, 2025

The session dialog previously only supported selecting/switching between existing sessions. This PR adds full CRUD (Create, Read, Update, Delete) operations to allow users to manage sessions directly from the dialog interface.

Changes Made

New Key Bindings

  • n - Create new session with custom title
  • e - Edit selected session title
  • d - Delete selected session (with confirmation)
  • y - Confirm deletion in confirmation mode

Dialog Modes

Added support for multiple interaction modes:

  • List mode - Browse and select sessions (default)
  • Create mode - Input field for new session title
  • Edit mode - Input field pre-filled with current session title
  • Delete confirmation - Safety prompt before deletion

UI Improvements

  • Updated dialog title from "Switch Session" to "Manage Sessions"
  • Added contextual help text showing available operations
  • Enhanced visual feedback with mode-specific layouts
  • Integrated textinput component for title editing

Backend Integration

  • Wired session dialog to use existing session service methods (Create, Save, Delete)
  • Added new message types (SessionCreatedMsg, SessionUpdatedMsg, SessionDeletedMsg)
  • Updated main TUI to handle CRUD messages and refresh session list automatically

Example Usage

┌──────────────────────────────────┐
│                                  │
│   Manage Sessions                │
│                                  │
│   ► Production Pentest           │
│     Development Tests            │
│     Client Demo                  │
│                                  │
│   n: new  e: edit  d: delete     │
│   enter: select  esc: close      │
│                                  │
└──────────────────────────────────┘

The implementation maintains consistency with existing dialog patterns while providing a seamless user experience for session management.

Fixes #21.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: yyovil <149292478+yyovil@users.noreply.github.com>
Copilot AI changed the title [WIP] need CRUD operations for sessions Add CRUD operations to session dialog Aug 20, 2025
Copilot AI requested a review from yyovil August 20, 2025 14:58
Copy link
Copy Markdown
Owner

@yyovil yyovil left a comment

Choose a reason for hiding this comment

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

User should be able to delete multiple sessions and also a shortcut for deleting all of them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

need CRUD operations for sessions

2 participants