5 Commits

Author SHA1 Message Date
vesp
24b1db4b9b Add environment management for projects with variable support 2025-12-30 12:37:13 +01:00
vesp
16b746adfa Use XDG/Flatpak standard directories for data storage
- Update history_manager to use GLib.get_user_config_dir()
- Update project_manager to use GLib.get_user_data_dir()
- Remove old filesystem permission from Flatpak manifest
- Fix Flatpak manifest: runtime version 49→47, correct git source URL

Data now stored in:
- Flatpak: ~/.var/app/cz.vesp.roster/{config,data}/cz.vesp.roster/
- Native: ~/.{config,local/share}/cz.vesp.roster/
2025-12-22 11:13:45 +01:00
vesp
3633117c5f Add smart tab management and duplicate request handling
Duplicate Name Detection:
- Warn when saving request with existing name in same project
- Show overwrite confirmation dialog with destructive styling
- Update existing request on overwrite (preserves ID, updates timestamp)
- Request names are unique within projects (but can duplicate across projects)

Save Request Improvements:
- Clear modified flag (•) when request is saved or overwritten
- Pre-fill save dialog with original request name and project
- Pre-fill save dialog with tab name for copy tabs
- Auto-select text in name field for easy editing

Smart Tab Loading:
- Switch to existing tab when loading unmodified saved request
- Create new tab only when needed (modified or doesn't exist)
- Avoid duplicate tabs for same request
- Show toast notification when switching to existing tab

Copy Tab Management:
- Create numbered copies when loading modified request again
- Naming: "ReqA (copy)", "ReqA (copy 2)", "ReqA (copy 3)", etc.
- Copy tabs are NOT linked to saved request (no saved_request_id)
- Copy tabs marked as unsaved (•) to encourage saving with new name
- Unique copy names prevent conflicts

Tab Response Persistence:
- Restore response when switching between tabs
- Each tab maintains independent response state
- Clear response area when switching to tab without response

Project Manager:
- Add find_request_by_name() for duplicate detection
- Add update_request() for overwriting existing requests
- Update request modified_at timestamp on save

Files Modified:
- src/project_manager.py: Duplicate detection and update methods
- src/window.py: Smart tab management and copy handling
2025-12-22 02:03:35 +01:00
vesp
6418aa0695 Add foldable sidebar with custom project icons
Implement a collapsible sidebar that can be folded to show just project
icons in a slim strip, or expanded to show full project details. Projects
can now have custom icons selected from a 6x6 grid of 36 symbolic icons.

Features:
- Foldable sidebar with toggle button (fold/unfold)
- Slim sidebar view showing only project icons when folded
- Custom project icons with 36 symbolic icon choices
- Icon picker dialog with 6x6 grid layout
- Edit Project dialog (renamed from Rename) with name and icon selection
- Project icons displayed in both full and slim sidebar views
- Smooth transitions between folded/unfolded states
- Click on slim project icon to unfold sidebar

Technical changes:
- Add icon field to Project model with default "folder-symbolic"
- Create constants.py with PROJECT_ICONS list (36 symbolic icons)
- Implement IconPickerDialog with grid layout and selection
- Create SlimProjectItem widget for folded sidebar view
- Update ProjectManager.update_project() to handle icon changes
- Restructure sidebar using GtkStack for full/slim view switching
- Update project-item.ui to display project icon
- Change "Rename" menu to "Edit Project" with icon picker
- Add fold/unfold buttons with sidebar-show icons
- Update build system with new files and resources
2025-12-18 15:37:29 +01:00
vesp
a73b838c7f Add left sidebar for managing saved requests in projects
Implement a 3-column layout with a collapsible sidebar for organizing
and managing HTTP requests within projects. Requests are stored in
~/.roster/requests.json for easy git versioning.

Features:
- Create, rename, and delete projects
- Save current request to a project with custom name
- Load saved requests with direct click (no confirmation dialog)
- Delete saved requests with confirmation
- Expandable/collapsible project folders
- Context menu for project actions

Technical changes:
- Add SavedRequest and Project data models with JSON serialization
- Implement ProjectManager for persistence to ~/.roster/requests.json
- Create RequestItem and ProjectItem widgets with GTK templates
- Restructure main window UI to nested GtkPaned (3-column layout)
- Add project management dialogs using AdwAlertDialog
- Update build system with new source files and UI resources
2025-12-18 15:16:21 +01:00