77 Commits

Author SHA1 Message Date
vesp
c2778f419a Track script changes and show modified flag when scripts are edited 2025-12-31 01:59:49 +01:00
vesp
f39acaf02e Save and restore scripts with saved requests to projects 2025-12-31 01:46:43 +01:00
vesp
59dcb78789 Fix GTK4 API: Use set_from_icon_name instead of set_icon_name
Corrects AttributeError when initializing script status icon.
2025-12-31 01:34:18 +01:00
vesp
96bbbcbc97 Add Scripts feature with JavaScript postprocessing
Implements JavaScript-based postprocessing for HTTP responses using gjs.
Adds Scripts tab with preprocessing (disabled) and postprocessing (functional) sections.
2025-12-31 01:32:14 +01:00
vesp
1fab66db48 Fix edit icon: use document-properties-symbolic instead 2025-12-31 00:33:20 +01:00
vesp
85b09af6f3 Make Manage Environments dialog wider and resizable 2025-12-31 00:30:09 +01:00
vesp
d4e8ebd303 Fix edit icon and move Add Variable button inside table as last row 2025-12-31 00:26:05 +01:00
vesp
e39715f5c0 Move Add Variable button to bottom of variable column and change edit icon 2025-12-31 00:21:38 +01:00
vesp
b51fa12f6a Improve dialog UX: enable Enter key activation for all input dialogs 2025-12-31 00:11:30 +01:00
vesp
bd54379377 Fix AttributeError: use set_size_request instead of set_width_request 2025-12-31 00:09:34 +01:00
vesp
ec2cb2768e Transpose environments table: variables as rows, environments as columns 2025-12-31 00:02:29 +01:00
vesp
5f01c1c49d Replace send button text with play icon 2025-12-30 23:32:41 +01:00
vesp
a979c16da9 Bump version to 0.2.0 v0.2.0 2025-12-30 19:57:40 +01:00
vesp
55610a13a5 Remove duplicate Request History panels from individual tabs 2025-12-30 19:51:33 +01:00
vesp
262fcf41ca Fix environment selector to always appear on left side 2025-12-30 16:34:30 +01:00
vesp
6794871306 Align environment selector to left with visual separator 2025-12-30 16:27:36 +01:00
vesp
1582e9479b Move environment selector to URL bar, remove label, add tooltip 2025-12-30 16:20:06 +01:00
vesp
80fe2a33f0 Show all variables as undefined when no environment is selected 2025-12-30 16:12:12 +01:00
vesp
3a903f28ec Show environment selector when loading project request into empty tab 2025-12-30 15:59:51 +01:00
vesp
1192038080 Save substituted values to history instead of variable templates 2025-12-30 14:38:25 +01:00
vesp
1cccded694 Add debug output for header indicators 2025-12-30 14:12:52 +01:00
vesp
277a8dc13e Fix visual indicators: add tooltips to headers, colored background to body 2025-12-30 14:07:13 +01:00
vesp
50f5661843 Add visual indicators for undefined variables 2025-12-30 13:10:26 +01:00
vesp
2ba3ced14e Implement environment variable substitution in requests 2025-12-30 12:54:26 +01:00
vesp
24b1db4b9b Add environment management for projects with variable support 2025-12-30 12:37:13 +01:00
vesp
26970cc392 Remove incorrect HTTPie dependency from documentation
HTTPie was listed as a dependency but the application actually uses libsoup3 from GNOME Platform. Updated README to reflect correct dependencies and removed installation instructions for HTTPie. Also corrected code comments to reference libsoup3 instead of HTTPie.
2025-12-26 02:09:01 +01:00
vesp
c9e53de55d Add history deletion features - clear all in preferences and delete individual items 2025-12-24 20:21:47 +01:00
vesp
2797a320c1 Add copy buttons for request and response content in history items 2025-12-24 13:49:55 +01:00
vesp
9d976478df Fix template errors - remove invalid cursor-name property and set cursor programmatically, remove debug output 2025-12-24 13:40:56 +01:00
vesp
95e3199172 Replace expander buttons with clickable separator boxes 2025-12-24 13:35:47 +01:00
vesp
3c5fc3c74a Fix GTK assertion error - set min/max heights in correct order 2025-12-24 13:15:39 +01:00
vesp
897b5c07ba Fix history expander button functionality - set both min and max content heights 2025-12-24 13:13:04 +01:00
vesp
deb48e4c85 Refactor to use AdwToolbarView like Epiphany
- Replace manual GtkBox layout with AdwToolbarView
- Add AdwHeaderBar and AdwTabBar as separate top bars
- Remove all custom CSS for header bar height matching
- AdwToolbarView automatically ensures consistent bar styling

This follows the proper libadwaita pattern used by GNOME Web.
2025-12-24 03:55:13 +01:00
vesp
9f05701df8 Add style classes to distinguish header bars
- Add "sidebar-header" and "main-header" style classes
- Target each header bar specifically in CSS
- Make tab bar ultra-compact to fit within header height
- Reduce tab padding and remove all internal margins
2025-12-24 03:48:50 +01:00
vesp
bbb4788a73 Fix CSS error and history loading
- Remove invalid max-height CSS property (GTK doesn't support it)
- Fix loading from history: update widget instead of calling removed method
- Update tab page title when loading from history
2025-12-24 03:45:51 +01:00
vesp
67a374899b Fix header bar height matching properly
- Revert show-title=False on main header (was hiding tabs)
- Use CSS to force both header bars to exact same height (46px)
- Remove vertical padding from header bars
- Keep tab bar compact to fit within fixed height
2025-12-24 03:40:45 +01:00
vesp
054d2418b0 Fix header bar heights to match exactly
Add show-title=False to main header bar to match sidebar
header configuration and ensure both have the same height.
2025-12-24 03:35:48 +01:00
vesp
0431ec16ab Fix critical bugs from second round of testing
1. Fixed infinite loop when closing last tab:
   - Return False instead of True when page already removed (prevents double-processing)
   - Remove from tracking BEFORE calling close_page_finish to prevent re-trigger
   - Properly schedule new tab creation only once

2. Fixed modified flag not clearing after save:
   - Update widget.original_request in _mark_tab_as_saved
   - Update widget.modified = False
   - Manually call _on_tab_modified_changed to clear indicator
   - Update tab page title when saving

3. Fixed header bar height and left spacing:
   - Added CSS to reduce headerbar min-height to 38px
   - Set headerbar padding-left to 0px to eliminate left gap
   - Made tabs more compact (min-height: 26px, reduced padding)
   - Reduced tabbar padding and margins

All critical issues from testing resolved!
2025-12-24 03:07:11 +01:00
vesp
d50622700e Fix all reported issues from testing
1. Modified indicator (*) now shows:
   - Added GObject signal 'modified-changed' to RequestTabWidget
   - Connect to signal in window.py to update tab page indicator
   - Indicator shows dot-symbolic icon when modified

2. History panel now visible and populated:
   - Restored history panel in main-window.ui with vertical paned layout
   - Added _load_history() call back to __init__
   - History entries now display in bottom panel

3. Saving requests now works:
   - Fixed on_save_request_clicked to get request from widget.get_request()
   - Removed dependency on obsolete _build_request_from_ui method

4. Loading saved requests fixed:
   - Updated _on_load_request to properly update widget and tab page
   - Correctly sets widget.original_request and widget.modified
   - Updates tab page title when loading into empty tab
   - Properly handles copy vs. linked request logic

All issues from user testing are now resolved!
2025-12-24 02:20:55 +01:00
vesp
32d5af04b6 Complete window.py cleanup - remove 400 lines of obsolete code
Removed obsolete UI methods now handled by RequestTabWidget:
- _setup_method_dropdown, _setup_request_tabs, _setup_response_tabs
- _build_request_from_ui, _load_request_to_ui
- _display_response, _display_error
- _extract_content_type, _get_language_from_content_type, _format_response_body
- on_add_header_clicked, _add_header_row, _on_header_remove
- _setup_sourceview_theme, _setup_request_body_theme
- _update_tab_indicator (now handled internally by widgets)

Added new HTTP handling:
- _on_send_clicked now works with RequestTabWidget
- Properly handles request/response through widget interface
- Updates history after requests complete

Result: 1237 lines → 841 lines (-396 lines, -32%)
App builds and runs successfully!
2025-12-24 02:05:37 +01:00
vesp
a89aa5c206 WIP: Refactoring window.py for per-tab widgets 2025-12-24 01:56:40 +01:00
vesp
6f32a61799 Add RequestTabWidget class and simplify main UI
- Create RequestTabWidget class with complete per-tab UI
- Simplify main-window.ui to just AdwTabBar and AdwTabView
- Set autohide=False to always show tabs
- Add request_tab_widget.py to meson.build

Next step: Refactor window.py to create RequestTabWidget instances for each tab.
2025-12-24 01:51:15 +01:00
vesp
2c4e70fa23 WIP: Initial AdwTabBar/AdwTabView implementation
This is a work-in-progress implementation of AdwTabBar/AdwTabView.
Current issues:
- Tab bar height is too large
- Large gap on left side of header
- Architecture needs refactoring: AdwTabView should contain per-tab UI widgets

Next step: Properly refactor so each tab has its own complete UI widget tree.
2025-12-24 01:47:45 +01:00
vesp
98e097a7c1 Maximize header space and enable tab scrolling
Remove application title from main header bar and wrap tabs in scrollable container. This prevents window resizing when many tabs are open and follows modern GNOME app patterns.
2025-12-23 12:36:59 +01:00
vesp
6031f4319d Polish tab UI styling with enhanced visual design
Document tabs (header bar):
- Add rounded corners with subtle backgrounds
- Highlight active tabs with accent color and bottom border
- Improve hover states with smooth 200ms transitions
- Enhance close button visibility and hover effects
- Reduce spacing for more compact appearance
- Increase tab name truncation limit to 25 chars

Stack switchers (Headers/Body tabs):
- Add pill-style rounded buttons (6px radius)
- Style active tabs with accent colors and bold text
- Add smooth crossfade transitions (150ms)
- Improve spacing with 8px top/bottom margins

All styling uses GNOME color tokens for consistent theming across
light and dark modes.
2025-12-23 10:27:40 +01:00
vesp
3bc155b127 Add preferences dialog with TLS and timeout settings
- Add PreferencesDialog with settings for TLS verification and request timeout
- Update HttpClient to respect TLS verification setting
- Add GSettings schema keys for force-tls-verification and request-timeout
- Wire up preferences action to show dialog
- Settings changes apply immediately to HTTP session
2025-12-23 10:17:22 +01:00
vesp
9a89cce5b1 Add explicit accelerators to shortcuts dialog
Replace action-name with explicit accelerator properties so the
keyboard shortcuts are displayed correctly in the dialog.
2025-12-22 23:53:05 +01:00
vesp
01943ecb1a Add shortcuts action to show keyboard shortcuts dialog
Create app.shortcuts action with Ctrl+? shortcut that loads and
displays the shortcuts window from GResources.
2025-12-22 23:50:41 +01:00
vesp
7fd77b7ba3 Simplify shortcuts dialog - remove groups
Use simple flat list of shortcuts without grouping.
2025-12-22 23:48:55 +01:00
vesp
2fda88d6f7 Fix shortcuts dialog using correct GTK types
Change from AdwShortcuts* to GtkShortcuts* widgets.
Libadwaita doesn't provide shortcuts widgets, these are from GTK.
2025-12-22 23:46:53 +01:00