Commit Graph

25 Commits

Author SHA1 Message Date
Shaun Arman
945ff6c6a4 fix: implement native DOCX export without pandoc dependency
Some checks failed
Test / rust-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Auto Tag / auto-tag (push) Failing after 4s
Test / rust-fmt-check (push) Successful in 1m32s
Test / rust-clippy (push) Has been cancelled
Replace pandoc-based DOCX export with native Rust implementation
using docx-rs crate. DOCX export now works out of the box without
requiring users to install external tools.

Changes:
- Added docx-rs dependency to Cargo.toml
- Implemented export_docx() in exporter.rs
- Removed pandoc subprocess calls from docs.rs
- Uses same markdown parsing as PDF export
- Handles titles, headings, and normal text with appropriate styling

Tested:
- Rust compilation ✓
- Rust formatting ✓
- TypeScript types ✓

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 12:53:36 -05:00
Shaun Arman
f738ee26ed chore: bump version to 0.2.0 after cleanup
Some checks failed
Auto Tag / auto-tag (push) Successful in 4s
Test / rust-fmt-check (push) Successful in 2m11s
Release / build-macos-arm64 (push) Successful in 5m40s
Test / rust-tests (push) Has been cancelled
Test / frontend-typecheck (push) Has been cancelled
Test / frontend-tests (push) Has been cancelled
Test / rust-clippy (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Fresh start with clean release history.

All previous tags and releases have been cleaned up.
This commit will trigger auto-tag to create v0.2.0.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 12:39:43 -05:00
Shaun Arman
6602fd7cd2 fix: improve download button visibility and add DOCX export
Some checks failed
Test / rust-fmt-check (push) Has been cancelled
Test / rust-clippy (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Test / frontend-typecheck (push) Has been cancelled
Test / frontend-tests (push) Has been cancelled
Auto Tag / auto-tag (push) Has been cancelled
1. Download Button Visibility:
   - Changed from variant=outline to default variant (solid background)
   - Provides better contrast and icon visibility in both themes
   - Removed unnecessary text-foreground class

2. DOCX Export Support:
   - Added DOCX export via pandoc conversion
   - Writes temp markdown file, converts with pandoc, cleans up
   - Returns clear error if pandoc not installed
   - Supports same workflow as MD/PDF exports

3. Triaging Status Investigation:
   - triaging status is defined in schema and used in dashboard counts
   - Currently not automatically set when entering triage
   - Kept in filter dropdown as part of the data model

Tested: Rust compilation, TypeScript types, Rust formatting

Note: DOCX export requires pandoc to be installed on the system.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 12:33:27 -05:00
Shaun Arman
0279d182ff chore: bump version to 0.1.22
Some checks failed
Auto Tag / auto-tag (push) Successful in 4s
Test / rust-fmt-check (push) Successful in 2m14s
Release / build-macos-arm64 (push) Failing after 5m36s
Release / build-linux-amd64 (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Test / frontend-typecheck (push) Has been cancelled
Test / rust-clippy (push) Has been cancelled
Test / frontend-tests (push) Has been cancelled
Update tauri.conf.json version to match release tags. This ensures
macOS properly replaces the app when installing from DMG.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 10:53:17 -05:00
Shaun Arman
484bfbe089 chore: fix Rust formatting
Some checks failed
Test / rust-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Auto Tag / auto-tag (push) Successful in 5s
Test / rust-fmt-check (push) Successful in 2m5s
Release / build-linux-arm64 (push) Failing after 2m10s
Release / build-macos-arm64 (push) Successful in 5m15s
Test / rust-clippy (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Apply cargo fmt to fix CI formatting check failures.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 10:00:25 -05:00
Shaun Arman
0235541c9b fix: UI visibility issues, export errors, filtering, and audit log enhancement
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>
2026-04-03 08:37:47 -05:00
Shaun Arman
4c4ca40146 fix: UI contrast issues and ARM64 build failure
**UI Fixes (TDD approach - tests first, then implementation):**
- Resolution steps: improved text contrast (text-foreground vs muted)
- DocEditor preview: added text-foreground class for readability
- History page: fixed domain display (category field) with better contrast
- Audit Log: added expandable rows with View/Hide buttons to show transmitted data
- Dashboard & buttons: already had proper contrast with outline variant
- Export document: fixed missing title/content parameters in command signature

**Tests Added (13 new tests, all passing):**
- tests/unit/resolution.test.tsx - resolution steps contrast
- tests/unit/docEditor.test.tsx - preview mode and export buttons
- tests/unit/exportDocument.test.ts - export parameters validation
- tests/unit/history.test.tsx - domain display and filtering
- tests/unit/dashboard.test.tsx - refresh button visibility
- tests/unit/auditLog.test.tsx - data visibility and expandable rows
- tests/unit/setup.ts - added @testing-library/jest-dom matchers

**CI Fix:**
- Removed platform label from ARM64 build step (native agent, old Docker)

**Test Results:**
- Frontend: 38/38 passing 
- Backend: 64/64 passing 
- TypeScript: no errors 

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 08:05:58 -05:00
Shaun Arman
47af97b68e feat: close issues, restore history, auto-save resolution steps
Some checks failed
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Auto Tag / auto-tag (push) Successful in 4s
Test / rust-fmt-check (push) Successful in 1m2s
Release / build-linux-arm64 (push) Failing after 1m11s
Release / build-macos-arm64 (push) Successful in 4m31s
Test / rust-clippy (push) Successful in 7m44s
Test / rust-tests (push) Has been cancelled
Release / build-linux-amd64 (push) Successful in 16m6s
Release / build-windows-amd64 (push) Successful in 12m38s
- db.rs: add get_issue_messages command (joins ai_conversations + ai_messages)
- tauriCommands.ts: fix updateIssueCmd to pass updates as nested object
  (was spreading inline — Rust expects {issueId, updates}); fix addFiveWhyCmd
  parameter names to match Rust (stepOrder, whyQuestion, answer, evidence);
  add getIssueMessagesCmd and IssueMessage interface
- Dashboard: X button on each open issue row to close (mark resolved) inline
- Triage: restore conversation history from DB when revisiting existing issues;
  detect close intent patterns and mark issue resolved + navigate home;
  auto-save resolution step via addFiveWhyCmd when AI advances why level
- tests: add issueActions.test.ts covering IPC arg structure and close intent
2026-03-31 12:50:39 -05:00
Shaun Arman
74afb47eac fix: provider routing uses provider_type, Active badge, fmt
Some checks failed
Auto Tag / auto-tag (push) Successful in 3s
Test / rust-fmt-check (push) Successful in 58s
Release / build-macos-arm64 (push) Successful in 4m13s
Test / rust-clippy (push) Successful in 7m25s
Release / build-linux-amd64 (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Test / rust-tests (push) Successful in 8m11s
Test / frontend-typecheck (push) Successful in 1m33s
Test / frontend-tests (push) Successful in 1m16s
2026-03-31 08:05:13 -05:00
Shaun Arman
652418017c fix: provider test FK error, model pull white screen, RECOMMENDED badge
Some checks failed
Auto Tag / auto-tag (push) Successful in 4s
Test / rust-fmt-check (push) Failing after 1m1s
Release / build-macos-arm64 (push) Successful in 3m2s
Test / rust-clippy (push) Successful in 7m16s
Test / frontend-typecheck (push) Has been cancelled
Test / frontend-tests (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
2026-03-31 07:46:36 -05:00
Shaun Arman
56e52ee09c fix: Ollama detection, install guide UI, and AI Providers auto-fill
Some checks failed
Auto Tag / auto-tag (push) Successful in 3s
Test / rust-fmt-check (push) Failing after 1m2s
Release / build-macos-arm64 (push) Successful in 2m50s
Test / rust-clippy (push) Successful in 7m24s
Test / frontend-typecheck (push) Has been cancelled
Test / frontend-tests (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
2026-03-31 07:25:33 -05:00
Shaun Arman
66de8f71cb fix: set SQLCipher cipher_page_size BEFORE first database access
Some checks are pending
Test / rust-fmt-check (push) Waiting to run
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
Previously cipher_page_size was set AFTER the verification SELECT,
making it a no-op (SQLCipher locks page size on first access). This
caused two bugs:

1. Databases were created with the default page size regardless of the
   setting, then flushed on close using misaligned 4KB mmap pages on
   16KB kernel → corrupted file → SQLITE_NOTADB on reopen.

2. Reopening an existing DB used default (potentially wrong) page size
   for the initial read → decryption failure.

Fix: batch all cipher settings (key, page_size, kdf_iter, algorithms)
into a single execute_batch call BEFORE the first SELECT. This ensures:
- New databases are created with 16KB pages (aligned to Asahi kernel)
- Existing 16KB-page databases are reopened with the correct page size
- Close/flush operations use properly aligned mmap → no corruption

Note: existing 4KB-page databases (from v0.1.0) remain incompatible
and must be deleted once on upgrade.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:25:43 -05:00
Shaun Arman
5d29f7fb61 chore: bump version to 0.1.1
Some checks failed
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Test / rust-fmt-check (push) Failing after 4s
Test / rust-clippy (push) Successful in 7m56s
Test / rust-tests (push) Has been cancelled
Release / build-linux-amd64 (push) Failing after 1m0s
Release / build-linux-arm64 (push) Waiting to run
Release / build-windows-amd64 (push) Has been cancelled
2026-03-29 21:01:08 -05:00
Shaun Arman
1e5284d4e0 fix: remove unused tauri-plugin-updater + SQLCipher 16KB page size
Some checks failed
Test / rust-fmt-check (push) Successful in 1m6s
Test / rust-clippy (push) Successful in 7m13s
Test / rust-tests (push) Successful in 9m3s
Test / frontend-typecheck (push) Successful in 3m29s
Test / frontend-tests (push) Successful in 1m27s
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Two startup crashes on first-party Tauri plugin init:
- tauri-plugin-updater registered with no plugins.updater config → removed
- tauri-plugin-cli was already removed in a prior commit

SQLCipher page size fix:
- cipher_page_size 4096 → 16384
- 4KB SQLCipher pages cause malloc() failures on Linux kernels with
  16KB page size (Asahi Linux aarch64+16k, Apple Silicon)
- 16384 is a valid page size that works on both 4KB and 16KB page kernels
- New installs get a 16KB-page database; existing 4KB-page DBs must
  be deleted for the new page size to take effect

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:12:15 -05:00
Shaun Arman
bdfda49853 fix: remove unused tauri-plugin-cli causing startup crash
Some checks failed
Test / rust-fmt-check (push) Successful in 1m10s
Test / frontend-tests (push) Waiting to run
Test / rust-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Test / rust-clippy (push) Has been cancelled
tauri-plugin-cli was registered in lib.rs but tauri.conf.json had no
plugins.cli configuration, causing PluginInitialization panic at startup.
The CLI plugin is not needed for a GUI desktop app — removed.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:05:15 -05:00
Shaun Arman
80f2072af5 docs: update README and wiki for Gitea Actions migration
Some checks failed
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Test / rust-clippy (push) Successful in 7m28s
Test / rust-fmt-check (push) Failing after 11m39s
Test / rust-tests (push) Has been cancelled
Replace all Gogs/Woodpecker references with Gitea/Gitea Actions:

README.md:
- CI badge → Gitea Actions workflow badge
- CI/CD section: Woodpecker → Gitea Actions (amd64 + arm64 runners)
- Project structure: .woodpecker/ → .gitea/workflows/
- Releases: arm64 now native (not QEMU)
- Phase 11/12 status updated

docs/wiki/Home.md:
- CI badge, tech stack, phase status updated

docs/wiki/Troubleshooting.md:
- Remove Woodpecker-specific items (JWT webhooks, orphan containers,
  plugin-git switch failure, Gogs token quirks)
- Add Gitea Actions troubleshooting: container network, apt-get update,
  job skip on tags, RELEASE_TOKEN, act_runner CONFIG_FILE requirement

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 17:46:34 -05:00
Shaun Arman
2026bdb3da fix: suppress MinGW auto-export to resolve Windows DLL ordinal overflow
Add src-tauri/.cargo/config.toml with --exclude-all-symbols linker flag
for x86_64-pc-windows-gnu. MinGW auto-exports ~106k public Rust symbols
into the cdylib export table, exceeding the 65,535 PE ordinal limit.
The desktop binary links against rlib (static) so the cdylib export table
is unused. An empty export table is a valid DLL.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:33:24 -05:00
Shaun Arman
8ccfdec72a fix: replace empty icon placeholder files with real app icons
Generated from icon.png (magnifying glass + bug on laptop — TFTSR debug theme):
- icon.ico: multi-size Windows ICO (16/32/48/64/128/256px) — fixes windres crash
- icon.icns: macOS ICNS (16/32/64/128/256/512px)
- 32x32.png, 128x128.png, 128x128@2x.png: regenerated from source

Fixes: x86_64-w64-mingw32-windres 'unexpected EOF' on Windows cross-compile build
2026-03-15 20:31:52 -05:00
Shaun Arman
1f062948fc fix: use bundled-sqlcipher-vendored-openssl for portable Windows cross-compilation
SQLCipher requires OpenSSL when cross-compiling for Windows with mingw-w64.
bundled-sqlcipher-vendored-openssl compiles OpenSSL from source — no system
OpenSSL needed for any target. Add perl to CI steps (required by OpenSSL build).
2026-03-15 19:17:36 -05:00
Shaun Arman
362687ad00 security: rotate exposed token, redact from PLAN.md, add secret patterns to .gitignore 2026-03-15 14:04:49 -05:00
Shaun Arman
4a5e70236a fix: retain GPU-VRAM-eligible models in recommender even when RAM is low 2026-03-15 13:48:46 -05:00
Shaun Arman
808500b7bd fix: inline format args for Rust 1.88 clippy compatibility 2026-03-15 13:28:59 -05:00
Shaun Arman
5198b6c636 fix: resolve all clippy lints (uninlined format args, range::contains, push_str single chars) 2026-03-15 13:10:26 -05:00
Shaun Arman
c8a717adee style: apply cargo fmt formatting 2026-03-15 12:43:46 -05:00
Shaun Arman
8839075805 feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.

Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)

Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)

DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload

Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:36:25 -05:00