Some checks failed
Auto Tag / auto-tag (push) Successful in 5s
Release / build-linux-arm64 (push) Failing after 2m19s
Test / rust-fmt-check (push) Failing after 2m18s
Release / build-macos-arm64 (push) Successful in 7m41s
Test / rust-clippy (push) Successful in 12m4s
Test / rust-tests (push) Successful in 12m40s
Test / frontend-typecheck (push) Successful in 1m43s
Test / frontend-tests (push) Successful in 1m21s
Release / build-linux-amd64 (push) Successful in 20m49s
Release / build-windows-amd64 (push) Successful in 13m59s
- Fix download icons (PDF/DOCX) not visible in dark theme by adding text-foreground class - Fix "Read-only file system" error by using Downloads directory for exports with proper fallback - Fix Search button visibility in History page by changing variant and adding icon - Fix domain-only filtering in History page by adding missing filter.domain handling - Enhance audit log to capture full transmitted data (provider details, messages, content previews) - Add dirs crate dependency for cross-platform directory detection - Add success/error feedback for document exports with file path display - Update Security page to display pretty-printed JSON audit details Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
5.6 KiB
5.6 KiB
Ticket Summary - UI Fixes and Audit Log Enhancement
Description
This ticket addresses multiple UI and functionality issues reported in the tftsr-devops_investigation application:
- Download Icons Visibility: Download icons (PDF, DOCX) in RCA and Post-Mortem pages were not visible in dark theme
- Export File System Error: "Read-only file system (os error 30)" error when attempting to export documents
- History Search Button: Search button not visible in the History page
- Domain Filtering: Domain-only filtering not working in History page
- Audit Log Enhancement: Audit log showed only internal IDs, lacking actual transmitted data for security auditing
Acceptance Criteria
- Download icons are visible in both light and dark themes on RCA and Post-Mortem pages
- Documents can be exported successfully to Downloads directory without filesystem errors
- Search button is visible with proper styling in History page
- Domain filter works independently without requiring a search query
- Audit log displays full transmitted data including:
- AI chat messages with provider details, user message, and response preview
- Document generation with content preview and metadata
- All entries show properly formatted JSON with details
Work Implemented
1. Download Icons Visibility Fix
Files Modified:
src/components/DocEditor.tsx:60-67
Changes:
- Added
text-foregroundclass to Download icons for PDF and DOCX buttons - Ensures icons inherit the current theme's foreground color for visibility
2. Export File System Error Fix
Files Modified:
src-tauri/Cargo.toml:38- Addeddirs = "5"dependencysrc-tauri/src/commands/docs.rs:127-170- Rewroteexport_documentfunctionsrc/pages/RCA/index.tsx:53-60- Updated error handling and user feedbacksrc/pages/Postmortem/index.tsx:52-59- Updated error handling and user feedback
Changes:
- Modified
export_documentto use Downloads directory by default instead of "." - Falls back to
app_data_dir/exportsif Downloads directory unavailable - Added proper directory creation with error handling
- Updated frontend to show success message with file path
- Empty
output_dirparameter now triggers default behavior
3. Search Button Visibility Fix
Files Modified:
src/pages/History/index.tsx:124-127
Changes:
- Changed button from
variant="outline"to default variant - Added Search icon to button for better visibility
- Button now has proper contrast in both themes
4. Domain-Only Filtering Fix
Files Modified:
src-tauri/src/commands/db.rs:305-312
Changes:
- Added missing
filter.domainhandling inlist_issuesfunction - Domain filter now properly filters by
i.categoryfield - Filter works independently of search query
5. Audit Log Enhancement
Files Modified:
src-tauri/src/commands/ai.rs:242-266- Enhanced AI chat audit loggingsrc-tauri/src/commands/docs.rs:44-73- Enhanced RCA generation audit loggingsrc-tauri/src/commands/docs.rs:90-119- Enhanced postmortem generation audit loggingsrc/pages/Settings/Security.tsx:191-206- Enhanced audit log display
Changes:
- AI chat audit now captures:
- Provider name, model, and API URL
- Full user message
- Response preview (first 200 chars)
- Token count
- Document generation audit now captures:
- Issue ID and title
- Document type and title
- Content length and preview (first 300 chars)
- Security page now displays:
- Pretty-printed JSON with proper formatting
- Entry ID and entity type below the data
- Better layout with whitespace handling
Testing Needed
Manual Testing
-
Download Icons Visibility
- Open RCA page in light theme
- Verify PDF and DOCX download icons are visible
- Switch to dark theme
- Verify PDF and DOCX download icons are still visible
-
Export Functionality
- Generate an RCA document
- Click "PDF" export button
- Verify file is created in Downloads directory
- Verify success message displays with file path
- Check file opens correctly
- Repeat for "MD" and "DOCX" formats
- Test on Post-Mortem page as well
-
History Search Button
- Navigate to History page
- Verify Search button is visible
- Verify button has search icon
- Test button in both light and dark themes
-
Domain Filtering
- Navigate to History page
- Select a domain from dropdown (e.g., "Linux")
- Do NOT enter any search text
- Verify issues are filtered by selected domain
- Change domain selection
- Verify filtering updates correctly
-
Audit Log
- Perform an AI chat interaction
- Navigate to Settings > Security > Audit Log
- Click "View" on a recent entry
- Verify transmitted data shows:
- Provider details
- User message
- Response preview
- Generate an RCA or Post-Mortem
- Check audit log for document generation entry
- Verify content preview and metadata are visible
Automated Testing
# Type checking
npx tsc --noEmit
# Rust compilation
cargo check --manifest-path src-tauri/Cargo.toml
# Rust linting
cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings
# Frontend tests (if applicable)
npm run test:run
Edge Cases to Test
- Export when Downloads directory doesn't exist
- Export with very long document titles (special character handling)
- Domain filter with empty result set
- Audit log with very large payloads (>1000 chars)
- Audit log JSON parsing errors (malformed data)