Commit Graph

29 Commits

Author SHA1 Message Date
Shaun Arman
397cef383d fix(ci): resolve test.yml failures — Cargo.lock, updated test assertions
All checks were successful
Test / rust-fmt-check (pull_request) Successful in 11s
Test / frontend-typecheck (pull_request) Successful in 1m11s
Test / frontend-tests (pull_request) Successful in 1m16s
PR Review Automation / review (pull_request) Successful in 3m29s
Test / rust-clippy (pull_request) Successful in 4m2s
Test / rust-tests (pull_request) Successful in 5m21s
Cargo.lock:
- Commit the pre-existing version bump (0.1.0 → 0.2.50) so cargo
  --locked does not fail in CI; Cargo.toml already at 0.2.50

releaseWorkflowCrossPlatformArtifacts.test.ts:
- Update test that previously checked for ubuntu:22.04 / ports mirror
  inline in auto-tag.yml; that setup moved to the pre-baked
  trcaa-linux-arm64 image so the test now verifies the image reference
  and cross-compile env vars instead

ciDockerBuilders.test.ts:
- Update test that checked for docker:24-cli; changed to alpine:latest
  + docker-cli to avoid act_runner v0.3.1 duplicate socket mount bug;
  negative assertion on docker:24-cli retained
2026-04-12 19:59:41 -05:00
Shaun Arman
6ebe3612cd fix: lint fixes and formatting cleanup
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m9s
Test / frontend-typecheck (pull_request) Successful in 1m15s
Test / rust-fmt-check (pull_request) Successful in 2m44s
Test / rust-clippy (pull_request) Successful in 24m22s
Test / rust-tests (pull_request) Successful in 25m43s
- Fix TypeScript lint errors in setup.ts and LogUpload
- Remove unused imports and variables
- Fix duplicate Separator exports in ui/index.tsx
- Apply cargo fmt formatting to Rust code
- Update ESLint configuration
2026-04-09 20:42:40 -05:00
Shaun Arman
5b8a7d7173 chore: Add GitHub Actions workflows
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m4s
Test / frontend-typecheck (pull_request) Successful in 1m6s
Test / rust-fmt-check (pull_request) Successful in 2m26s
Test / rust-clippy (pull_request) Successful in 19m4s
Test / rust-tests (pull_request) Successful in 20m16s
- test.yml: Rust fmt/clippy/tests, frontend typecheck/tests
- build-images.yml: CI Docker image builds
- release.yml: Auto-tag, wiki sync, multi-platform release builds

Fixes: -testing-library/react screen import for v16 compatibility
2026-04-08 21:53:44 -05:00
Shaun Arman
19cc78a05f feat: add image attachment support with PII detection
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m4s
Test / frontend-typecheck (pull_request) Failing after 1m6s
Test / rust-fmt-check (pull_request) Successful in 2m42s
Test / rust-clippy (pull_request) Successful in 19m1s
Test / rust-tests (pull_request) Failing after 20m7s
- Add image_attachments table to database schema (migration 013)
- Implement image upload, list, delete, and clipboard paste commands
- Add image file PII detection with user approval workflow
- Register image attachment commands in Tauri IPC
- Update TypeScript types and frontend components
- Add unit tests for image attachment functionality
- Update README and wiki documentation
2026-04-08 20:03:34 -05:00
Shaun Arman
1de50f1c87 chore: remove all proprietary vendor references for public release
- Delete internal vendor API documentation and handoff docs
- Remove vendor-specific AI gateway URLs from CSP whitelist
- Replace vendor-specific log prefixes and comments with generic 'Custom REST'
- Remove vendor-specific default auth header from custom REST implementation
- Remove vendor-specific client header from HTTP requests
- Remove backward-compat vendor format identifier from is_custom_rest_format()
- Remove LEGACY_API_FORMAT constant and normalizeApiFormat() helper
- Update test to not reference legacy format identifier
- Update wiki docs to use generic enterprise gateway configuration
- Update architecture diagrams and ADR-003 to remove vendor references
- Add Buy Me A Coffee link to README
- Update .gitignore to exclude internal user guide and ticket files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 09:46:25 -05:00
Shaun Arman
f54d1aa6a8 fix(ci): remove explicit docker.sock mount — act_runner mounts it automatically 2026-04-05 21:18:11 -05:00
Shaun Arman
eb8a0531e6 feat(ci): add persistent pre-baked Docker builder images
Add three Dockerfiles under .docker/ and a build-images.yml workflow that
pushes them to the local Gitea container registry (172.0.0.29:3000).

Each image pre-installs all system deps, Node.js 22, and the Rust cross-
compilation target so release builds can skip apt-get entirely:

  trcaa-linux-amd64:rust1.88-node22   — webkit2gtk, gtk3, all Tauri deps
  trcaa-windows-cross:rust1.88-node22 — mingw-w64, nsis, Windows target
  trcaa-linux-arm64:rust1.88-node22   — arm64 multiarch dev libs, Rust 1.88

build-images.yml triggers automatically when .docker/ changes on master
and supports workflow_dispatch for manual/first-time builds.

auto-tag.yml is NOT changed in this commit — switch it to use the new
images in the follow-up PR (after images are pushed to the registry).

One-time server setup required before first use:
  echo '{"insecure-registries":["172.0.0.29:3000"]}' \
    | sudo tee /etc/docker/daemon.json && sudo systemctl restart docker
2026-04-05 21:07:17 -05:00
Shaun Arman
fc50fe3102 test(store): add PII pattern persistence tests for settingsStore 2026-04-05 19:33:23 -05:00
Shaun Arman
9188a63305 fix(ci): switch build-linux-arm64 to Ubuntu 22.04 with ports mirror
The Debian single-mirror multiarch approach causes irreconcilable
apt dependency conflicts when both amd64 and arm64 point at the same
repo: the binary-all index is duplicated and certain -dev package pairs
lack Multi-Arch: same. This produces "held broken packages" regardless
of sources.list tweaks.

Ubuntu 22.04 routes arm64 through ports.ubuntu.com/ubuntu-ports, a
separate mirror from archive.ubuntu.com (amd64). This eliminates all
cross-arch index overlaps. Rust is installed via rustup since it is not
pre-installed in the Ubuntu base image. libayatana-appindicator3-dev
is dropped — no tray icon is used by this application.

Co-Authored-By: fix/yaml-heredoc-indent <noreply@local>
2026-04-05 12:51:19 -05:00
Shaun Arman
cde4a85cc7 fix(ci): fix arm64 cross-compile, drop cargo install tauri-cli, move wiki-sync
build-linux-arm64: switch from QEMU-emulated linux-arm64 runner to cross-compile
on linux-amd64 using aarch64-linux-gnu toolchain. Removes the uname -m arch guard
that was causing the job to exit immediately (QEMU reports x86_64 as kernel arch),
and fixes the artifact path to the explicit target directory.

All build jobs: replace `cargo install tauri-cli --locked` with `npx tauri build`,
using the pre-compiled @tauri-apps/cli binary from devDependencies. Eliminates the
20-30 min Tauri CLI recompilation on every run.

wiki-sync: move from test.yml to auto-tag.yml. test.yml only fires on pull_request
events so the `if: github.ref == 'refs/heads/master'` guard was never true and the
wiki was never updated. auto-tag.yml triggers on push to master, so wiki sync now
runs on every merge.

Update releaseWorkflowCrossPlatformArtifacts.test.ts to match the new workflow.
2026-04-05 10:33:53 -05:00
Shaun Arman
281e676ad1 fix(security): harden secret handling and audit integrity
Remove high-risk defaults and tighten data handling across auth, storage, IPC, provider calls, and capabilities so sensitive data is better protected by default. Also update README/wiki security guidance and add targeted tests for the new hardening behaviors.

Made-with: Cursor
2026-04-04 23:37:05 -05:00
Shaun Arman
b1d794765f fix(ci): unblock release jobs and namespace linux artifacts by arch
Drop fragile job-condition gates that were blocking release jobs, and upload linux artifacts with arch-prefixed release asset names so amd64 and arm64 outputs can coexist even when bundle filenames are identical.

Made-with: Cursor
2026-04-04 23:17:12 -05:00
Shaun Arman
7b5f2daaa4 fix(ci): run linux arm release natively and enforce arm artifacts
Avoid cross-compiling GTK/glib on the arm release job by building natively on ARM64 hosts, add an explicit architecture guard, and restrict uploads to arm64/aarch64 artifact filenames so amd64 outputs cannot be published as arm releases.

Made-with: Cursor
2026-04-04 22:46:23 -05:00
Shaun Arman
aaa48d65a2 fix(ci): force explicit linux arm64 target for release artifacts
Build linux arm64 bundles with --target aarch64-unknown-linux-gnu and upload from the target-specific bundle path so arm64 releases cannot accidentally publish amd64 artifacts.

Made-with: Cursor
2026-04-04 22:15:02 -05:00
Shaun Arman
e20228da6f refactor(ci): remove standalone release workflow
Delete .gitea/workflows/release.yml and keep release orchestration in auto-tag.yml only, then update related workflow tests and docs to reference the unified pipeline.

Made-with: Cursor
2026-04-04 21:34:15 -05:00
Shaun Arman
b69c132a0a fix(ci): run post-tag release builds without job-output gating
Remove auto-tag job output dependencies and conditional gates so release build jobs always run after autotag completes, resolving skipped fan-out caused by output/if evaluation issues in Gitea Actions.

Made-with: Cursor
2026-04-04 21:24:24 -05:00
Shaun Arman
a6b4ed789c fix(ci): use stable auto-tag job outputs for release fanout
Rename the auto-tag job id to a non-hyphenated identifier and update needs/output references so dependent release jobs evaluate conditions correctly and reliably run after tagging.

Made-with: Cursor
2026-04-04 21:21:35 -05:00
Shaun Arman
93ead1362f fix(ci): guarantee release jobs run after auto-tag
Run linux/windows/macos/arm release build and upload jobs in the auto-tag workflow with needs:auto-tag outputs so release execution no longer depends on a second tag-triggered workflow dispatch path.

Made-with: Cursor
2026-04-04 21:19:13 -05:00
Shaun Arman
48041acc8c fix(ci): trigger release workflow from auto-tag pushes
Switch auto-tag to create and push tags via git instead of the tag API so Gitea emits a real tag push event that reliably starts release builds. Document the trigger behavior and add a workflow regression test.

Made-with: Cursor
2026-04-04 21:14:41 -05:00
Shaun Arman
2d35e2a2c1 fix(ci): harden release asset uploads for reruns
Make all release upload steps fail fast when expected artifacts are missing, replace existing same-name assets before uploading, and print HTTP/body details on upload failures so Linux/Windows publishing issues are diagnosable and reruns remain deterministic.

Made-with: Cursor
2026-04-04 21:09:03 -05:00
Shaun Arman
c3fd83f330 fix(ci): make release artifacts reliable across platforms
Override OpenSSL vendoring for the windows-gnu release build so cross-compiles no longer fail on pkg-config lookup, and fail fast when Linux release jobs produce no artifacts so incomplete releases are detected immediately.

Made-with: Cursor
2026-04-04 19:53:40 -05:00
82c18871af Merge pull request 'fix/skip-master-test-workflow' (#3) from fix/skip-master-test-workflow into master
Some checks failed
Release / build-windows-amd64 (push) Has been cancelled
Release / build-macos-arm64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Reviewed-on: #3
2026-04-04 21:48:47 +00:00
Shaun Arman
b426f56149 fix: resolve macOS bundle path after app rename
Find the generated .app bundle dynamically in release CI so macOS packaging no longer depends on the legacy TFTSR.app name. Add a unit test to prevent regressions by asserting the old hardcoded path is not reintroduced.

Made-with: Cursor
2026-04-04 16:28:01 -05:00
Shaun Arman
c4ea32e660 feat: add custom_rest provider mode and rebrand application name
Rename custom API format handling from custom_rest to custom_rest with backward compatibility, add guided model selection with custom entry in provider settings, and rebrand app naming to Troubleshooting and RCA Assistant across UI, metadata, and docs.

Made-with: Cursor
2026-04-04 15:35:58 -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
944b14e5c4 fix: dashboard shows — while loading, exposes errors, adds refresh button
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 1m7s
Release / build-macos-arm64 (push) Successful in 4m1s
Test / rust-clippy (push) Successful in 7m26s
Test / rust-tests (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Stat cards showed 0 immediately on mount because openCount was computed
from an empty issues array before the async loadIssues call resolved.
Now shows — during load, a red error banner if the backend call fails,
and a Refresh button. useEffect dependency changed to [] (fires once on
mount, not on every loadIssues reference check).
2026-03-31 08:55:05 -05:00
Shaun Arman
ebf60d17c6 fix: navigate to /logs after issue creation, fix dashboard category display
Some checks failed
Test / frontend-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Auto Tag / auto-tag (push) Successful in 3s
Test / rust-fmt-check (push) Successful in 1m6s
Release / build-macos-arm64 (push) Successful in 3m24s
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-clippy (push) Successful in 7m15s
Test / rust-tests (push) Has been cancelled
- NewIssue: navigate to /issue/:id/logs so log upload step is not skipped
- Dashboard: use issue.category instead of issue.domain (field name matches Rust)
- tests: add historyStore tests covering open count logic and field mapping
2026-03-31 08:26:25 -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