tftsr-devops_investigation/src/lib
Shaun Arman 5fae3c79a7
Some checks failed
Test / rust-clippy (push) Waiting to run
Test / rust-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Test / wiki-sync (push) Waiting to run
Auto Tag / auto-tag (push) Successful in 5s
Test / rust-fmt-check (push) Has been cancelled
Release / build-macos-arm64 (push) Successful in 4m47s
Release / build-linux-arm64 (push) Failing after 22m59s
Release / build-linux-amd64 (push) Successful in 28m35s
Release / build-windows-amd64 (push) Successful in 14m37s
fix: persist integration settings and implement persistent browser windows
## Integration Settings Persistence
- Add database commands to save/load integration configs (base_url, username, project_name, space_key)
- Frontend now loads configs from DB on mount and saves changes automatically
- Fixes issue where settings were lost on app restart

## Persistent Browser Window Architecture
- Integration browser windows now stay open for user browsing and authentication
- Extract fresh cookies before each API call to handle token rotation
- Track open windows in app state (integration_webviews HashMap)
- Windows titled as "{Service} Browser (TFTSR)" for clarity
- Support easy navigation between app and browser windows (Cmd+Tab/Alt+Tab)
- Gracefully handle closed windows with automatic cleanup

## Bug Fixes
- Fix Rust formatting issues across 8 files
- Fix clippy warnings:
  - Use is_some_and() instead of map_or() in openai.rs
  - Use .to_string() instead of format!() in integrations.rs
- Add missing OptionalExtension import for .optional() method

## Tests
- Add test_integration_config_serialization
- Add test_webview_tracking
- Add test_token_auth_request_serialization
- All 6 integration tests passing

## Files Modified
- src-tauri/src/state.rs: Add integration_webviews tracking
- src-tauri/src/lib.rs: Register 3 new commands, initialize webviews HashMap
- src-tauri/src/commands/integrations.rs: Config persistence, fresh cookie extraction (+151 lines)
- src-tauri/src/integrations/webview_auth.rs: Persistent window behavior
- src/lib/tauriCommands.ts: TypeScript wrappers for new commands
- src/pages/Settings/Integrations.tsx: Load/save configs from DB

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 09:57:22 -05:00
..
domainPrompts.ts fix: domainPrompts closing brace too early; arm64 use native platform image 2026-03-31 19:36:07 -05:00
tauriCommands.ts fix: persist integration settings and implement persistent browser windows 2026-04-04 09:57:22 -05:00