Skip to content

Fix cfg-dependent Clippy unused_mut failure in known log source construction - #1

Merged
adamgell merged 4 commits into
mainfrom
copilot/fix-unused-mut-variables
Mar 13, 2026
Merged

Fix cfg-dependent Clippy unused_mut failure in known log source construction#1
adamgell merged 4 commits into
mainfrom
copilot/fix-unused-mut-variables

Conversation

Copilot AI commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Clippy was failing under -D warnings because build_known_log_sources() declared a mutable local that is only mutated on Windows. On non-Windows CI, the cfg-gated mutation is compiled out, leaving an unused_mut hard error.

  • Root cause

    • build_known_log_sources() initialized sources as mutable and extended it inside a #[cfg(target_os = "windows")] block.
    • On Linux, that block does not compile in, so the binding is never mutated.
  • Change

    • Reworked build_known_log_sources() to return platform-specific values directly:
      • windows_known_log_sources() on Windows
      • Vec::new() on non-Windows
    • This keeps behavior unchanged while removing the cfg-dependent lint.
  • Result

    • Eliminates the unused_mut warning that was promoted to an error by Clippy in CI.
fn build_known_log_sources() -> Vec<KnownSourceMetadata> {
    #[cfg(target_os = "windows")]
    {
        return windows_known_log_sources();
    }

    Vec::new()
}

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: adamgell <27519+adamgell@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Clippy lint error for unused mutable variables Fix cfg-dependent Clippy unused_mut failure in known log source construction Mar 13, 2026
Copilot AI requested a review from adamgell March 13, 2026 04:41
GitHub Actions retired macos-13. ARM64 builds via macos-latest
cover Intel Macs through Rosetta 2.
@adamgell
adamgell marked this pull request as ready for review March 13, 2026 12:09
Copilot AI review requested due to automatic review settings March 13, 2026 12:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a cfg-dependent Clippy warning in the Tauri backend by changing how known log sources are constructed, and updates GitHub Actions workflows to stop building macOS Intel artifacts.

Changes:

  • Refactors build_known_log_sources() to avoid unused_mut when Windows-only code is cfg’d out.
  • Removes macOS x86_64 (Intel) from the CI build matrix.
  • Removes macOS x86_64 (Intel) from the release workflow matrix and release-notes downloads table.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src-tauri/src/commands/file_ops.rs Refactors known-source construction to avoid cfg-dependent unused_mut.
.github/workflows/cmtrace-ci.yml Drops macOS Intel build from CI matrix.
.github/workflows/cmtrace-release.yml Drops macOS Intel release build and updates release body table accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src-tauri/src/commands/file_ops.rs
Comment thread .github/workflows/cmtrace-ci.yml
Comment thread .github/workflows/cmtrace-release.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@adamgell
adamgell self-requested a review March 13, 2026 13:49
@adamgell

Copy link
Copy Markdown
Owner

@copilot approve this its ready to go

Copilot AI commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot approve this its ready to go

I can’t submit a GitHub PR approval from this interface. The branch is ready from my side based on the completed fix and validation; the latest addressing commit is c493e7c.

Copilot AI requested a review from adamgell March 13, 2026 13:51
@adamgell
adamgell merged commit b28e9a2 into main Mar 13, 2026
6 checks passed
adamgell added a commit that referenced this pull request Apr 3, 2026
Restrict GITHUB_TOKEN to contents:read across all jobs to satisfy
the principle of least privilege. Resolves CodeQL alerts #1#3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
adamgell added a commit that referenced this pull request Apr 5, 2026
…kload, activity view, unified timeline, session, diff (#82)

* feat(merge): add showMergeTabsDialog state to ui-store
* feat(merge): add pure merge logic — sorting, colors, correlation
* feat(merge): add MergedTabState, merge/correlation actions to log store
* feat(merge): create MergeLegendBar with file toggles and correlation controls
* feat(merge): create MergeTabsDialog component
* feat(merge): add Merge Tabs button to toolbar
* feat(merge): wire MergeTabsDialog into AppShell
* feat(merge): show merged tab indicator in tab strip
* feat(merge): add file color borders, correlation highlights, and legend bar to log view
* feat(merge): add Merge into Timeline button to folder sidebar
* feat(merge): add correlated entries section to InfoPane
* docs: add unified timeline spec and implementation plan
* docs: add session save/restore and log diff specs
* feat(session): add recentSessions state to ui-store
* feat(session): add compute_file_hash Rust command
* feat(diff): add normalization, pattern key, and classification logic
* feat(session): add session types, save, and restore logic
* feat(diff): add DiffState and diff actions to log store
* feat(session): add Save/Open Session menu items and handlers
* feat(diff): add DiffConfigDialog, toolbar button, and ui-store state
* feat(diff): create DiffView with side-by-side and unified modes
* feat: wire DiffConfigDialog into AppShell, render DiffView, update changelog
* fix: address code review — scroll sync, session restore, validation, performa
* fix: address Copilot PR review — accessibility, UTF-8, GUID casing, cleanup
* Add Graph API GUID resolution (Windows)
Introduce end-to-end Microsoft Graph integration to resolve Intune app GUIDs. Backend: new src-tauri/src/graph_api.rs implements WAM-based Windows auth, token caching, batch/single Graph requests, paginated app fetches and an in-memory GUID cache; adds fetch_all_apps and resolve_guids utilities. Frontend: new GraphApiTab settings UI to enable/sign-in/pre-populate cache, a startup hook to auto-connect and populate cache, status bar indicator for Graph status, and enhancements to the GUID registry dialog (tabs, filtering, publisher/type columns). Add lib/graph-registry.ts to convert GraphAppInfo to GuidRegistry entries and update types (GuidCategory, publisher). Also improve event_tracker to extract PolicyId from JSON payloads. Wire startup import in main.tsx and add ui-store state/handlers for graphApiEnabled and graphApiStatus.
* feat: add Microsoft Graph API integration for GUID resolution
Add opt-in Graph API support to resolve Intune app GUIDs to display
names using the device's existing Entra ID session via WAM (Web Account
Manager). No app registration required — uses the Microsoft Graph
PowerShell public client ID.
- WAM authentication with HWND interop for Win32 desktop apps
- Graph API client with batch resolution ($batch endpoint, 20 per request)
- Pre-populate cache button fetches all tenant apps in one call
- GraphApi source variant (highest confidence) in GuidRegistry
- Settings tab with opt-in toggle (off by default), consent warnings,
  and connection status display
- Automatic enrichment during Intune log analysis when enabled



* fix: resolve merge conflicts with Graph API integration, fix CI

- Fix analyze_intune_logs to use app.state() instead of cfg-gated parameter
  (Tauri generate_handler! can't handle #[cfg] on parameters)
- Gate Manager import to windows-only in both lib.rs and intune.rs
- Resolve merge conflicts in ui-store.ts (recentSessions + graphApi state)
- Resolve merge conflicts in GraphApiTab.tsx (keep buildGraphRegistryEntries)
- Fix GuidRegistryDialog aria-label to use entry.guid



* fix: address PR #82 review — ID collisions, persist sessions, correlation refresh, diff close



* ci: force clean build to resolve stale cache

* fix: add missing script_body and parent_app_guid to RFC3339 test

- The sysmon merge brought a new test (build_timeline_sorts_rfc3339_timestamps)
that was missing the two fields added to IntuneEvent in the AppWorkload PR.



* security: add explicit permissions to CI workflow

- Restrict GITHUB_TOKEN to contents:read across all jobs to satisfy
the principle of least privilege. Resolves CodeQL alerts #1#3.



* fix: gate sysmon module behind feature flag, fix clippy

- Add sysmon feature to Cargo.toml, include in full feature set
- Gate pub mod sysmon and analyze_sysmon_logs command with #[cfg(feature = "sysmon")]
- Gate sysmon commands mod with #[cfg(feature = "sysmon")]
- Add required-features = ["sysmon"] to sysmon_parser test
- Fix clippy needless_range_loop in event_tracker.rs



* fix: resolve merge conflicts in graph_api.rs

- Unresolved conflict markers from d065202 merge caused unclosed
delimiter errors on Windows CI builds. Kept the refactored
fetch_paginated helper that supports multiple Intune endpoints.



* fix: resolve merge conflicts from upstream session/diff features

- Merge Graph API integration (graphApiEnabled, graphApiStatus) with
upstream session save/restore (recentSessions) and diff features.



* feat: implement live Windows Event Log queries
- Implement EvtOpenChannelEnum, EvtQuery, EvtNext, EvtRender, and
EvtFormatMessage via Win32 API to query live event log channels.
Auto-loads Application, System, Security, and Setup on "This Computer".
- Raw FFI for channel enumeration (fixes NULL handle issue)
- Buffer retry for EvtRender with both Win32 and HRESULT error codes
- Rendered messages via EvtFormatMessage with publisher metadata cache
- XML string parsing for EventID, Level, Provider, TimeCreated, EventData
- Progressive channel loading with per-channel error handling
- Channel picker: Event Viewer-style tree (Windows Logs / App & Services)
- Resizable channel sidebar with drag handle
- Resizable detail pane with drag handle
- Arrow key navigation in timeline (Up/Down/Home/End)
- Progress bar during channel loading
- Status bar shows "Event Log" with channel/event counts
- Load button for querying additional checked channels
- Error messages surfaced to frontend via errorMessages field
* feat: live event log queries, Graph API scripts, parallel loading
Live Event Log:
- Implement Win32 EvtQuery/EvtRender/EvtFormatMessage for live channel queries
- Auto-load Application, System, Security, Setup in parallel
- Event Viewer-style nested tree sidebar (split on - and /)
- Resizable sidebar and detail pane with drag handles
- Arrow key navigation in timeline
- Progressive loading with spinner and elapsed time in status bar
- Refresh button to reload channels
- No event cap — loads all events on disk
- DevTools auto-open in debug builds

Graph API enhancements:
- Fetch remediation scripts, platform scripts, shell scripts
- GUID Registry tabbed view (All/Apps/Scripts/Remediations)
- Category and publisher columns
- Auto-connect on startup with status bar indicator
- PolicyId extraction for HealthScripts events

Fixes:
- HRESULT error code handling (low 16-bit extraction)
- EvtRender buffer retry for large events
- Status bar shows correct workspace labels
- Hide FileSidebar in Event Log workspace
* fix: gate devtools and progress events for cross-platform CI
- Gate open_devtools behind #[cfg(all(debug_assertions, desktop))]
- Gate EvtxQueryProgress, Serialize, Emitter behind #[cfg(target_os = "windows")]
- Fixes cargo check on Ubuntu CI
adamgell added a commit that referenced this pull request Apr 6, 2026
* feat(merge): add showMergeTabsDialog state to ui-store

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): add pure merge logic — sorting, colors, correlation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): add MergedTabState, merge/correlation actions to log store

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): create MergeLegendBar with file toggles and correlation controls

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): create MergeTabsDialog component

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): add Merge Tabs button to toolbar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): wire MergeTabsDialog into AppShell

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): show merged tab indicator in tab strip

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): add file color borders, correlation highlights, and legend bar to log view

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): add Merge into Timeline button to folder sidebar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(merge): add correlated entries section to InfoPane

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add unified timeline spec and implementation plan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add session save/restore and log diff specs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(session): add recentSessions state to ui-store

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(session): add compute_file_hash Rust command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(diff): add normalization, pattern key, and classification logic

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(session): add session types, save, and restore logic

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(diff): add DiffState and diff actions to log store

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(session): add Save/Open Session menu items and handlers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(diff): add DiffConfigDialog, toolbar button, and ui-store state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(diff): create DiffView with side-by-side and unified modes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: wire DiffConfigDialog into AppShell, render DiffView, update changelog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address code review — scroll sync, session restore, validation, performance

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address Copilot PR review — accessibility, UTF-8, GUID casing, cleanup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add Graph API GUID resolution (Windows)

Introduce end-to-end Microsoft Graph integration to resolve Intune app GUIDs. Backend: new src-tauri/src/graph_api.rs implements WAM-based Windows auth, token caching, batch/single Graph requests, paginated app fetches and an in-memory GUID cache; adds fetch_all_apps and resolve_guids utilities. Frontend: new GraphApiTab settings UI to enable/sign-in/pre-populate cache, a startup hook to auto-connect and populate cache, status bar indicator for Graph status, and enhancements to the GUID registry dialog (tabs, filtering, publisher/type columns). Add lib/graph-registry.ts to convert GraphAppInfo to GuidRegistry entries and update types (GuidCategory, publisher). Also improve event_tracker to extract PolicyId from JSON payloads. Wire startup import in main.tsx and add ui-store state/handlers for graphApiEnabled and graphApiStatus.

* feat: add Microsoft Graph API integration for GUID resolution

Add opt-in Graph API support to resolve Intune app GUIDs to display
names using the device's existing Entra ID session via WAM (Web Account
Manager). No app registration required — uses the Microsoft Graph
PowerShell public client ID.

- WAM authentication with HWND interop for Win32 desktop apps
- Graph API client with batch resolution ($batch endpoint, 20 per request)
- Pre-populate cache button fetches all tenant apps in one call
- GraphApi source variant (highest confidence) in GuidRegistry
- Settings tab with opt-in toggle (off by default), consent warnings,
  and connection status display
- Automatic enrichment during Intune log analysis when enabled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve merge conflicts with Graph API integration, fix CI

- Fix analyze_intune_logs to use app.state() instead of cfg-gated parameter
  (Tauri generate_handler! can't handle #[cfg] on parameters)
- Gate Manager import to windows-only in both lib.rs and intune.rs
- Resolve merge conflicts in ui-store.ts (recentSessions + graphApi state)
- Resolve merge conflicts in GraphApiTab.tsx (keep buildGraphRegistryEntries)
- Fix GuidRegistryDialog aria-label to use entry.guid

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address PR #82 review — ID collisions, persist sessions, correlation refresh, diff close

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ci: force clean build to resolve stale cache

* fix: add missing script_body and parent_app_guid to RFC3339 test

The sysmon merge brought a new test (build_timeline_sorts_rfc3339_timestamps)
that was missing the two fields added to IntuneEvent in the AppWorkload PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* security: add explicit permissions to CI workflow

Restrict GITHUB_TOKEN to contents:read across all jobs to satisfy
the principle of least privilege. Resolves CodeQL alerts #1#3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: gate sysmon module behind feature flag, fix clippy

- Add sysmon feature to Cargo.toml, include in full feature set
- Gate pub mod sysmon and analyze_sysmon_logs command with #[cfg(feature = "sysmon")]
- Gate sysmon commands mod with #[cfg(feature = "sysmon")]
- Add required-features = ["sysmon"] to sysmon_parser test
- Fix clippy needless_range_loop in event_tracker.rs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve merge conflicts in graph_api.rs

Unresolved conflict markers from d065202 merge caused unclosed
delimiter errors on Windows CI builds. Kept the refactored
fetch_paginated helper that supports multiple Intune endpoints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve merge conflicts from upstream session/diff features

Merge Graph API integration (graphApiEnabled, graphApiStatus) with
upstream session save/restore (recentSessions) and diff features.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: implement live Windows Event Log queries

Implement EvtOpenChannelEnum, EvtQuery, EvtNext, EvtRender, and
EvtFormatMessage via Win32 API to query live event log channels.
Auto-loads Application, System, Security, and Setup on "This Computer".

- Raw FFI for channel enumeration (fixes NULL handle issue)
- Buffer retry for EvtRender with both Win32 and HRESULT error codes
- Rendered messages via EvtFormatMessage with publisher metadata cache
- XML string parsing for EventID, Level, Provider, TimeCreated, EventData
- Progressive channel loading with per-channel error handling
- Channel picker: Event Viewer-style tree (Windows Logs / App & Services)
- Resizable channel sidebar with drag handle
- Resizable detail pane with drag handle
- Arrow key navigation in timeline (Up/Down/Home/End)
- Progress bar during channel loading
- Status bar shows "Event Log" with channel/event counts
- Load button for querying additional checked channels
- Error messages surfaced to frontend via errorMessages field

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: live event log queries, Graph API scripts, parallel loading

Live Event Log:
- Implement Win32 EvtQuery/EvtRender/EvtFormatMessage for live channel queries
- Auto-load Application, System, Security, Setup in parallel
- Event Viewer-style nested tree sidebar (split on - and /)
- Resizable sidebar and detail pane with drag handles
- Arrow key navigation in timeline
- Progressive loading with spinner and elapsed time in status bar
- Refresh button to reload channels
- No event cap — loads all events on disk
- DevTools auto-open in debug builds

Graph API enhancements:
- Fetch remediation scripts, platform scripts, shell scripts
- GUID Registry tabbed view (All/Apps/Scripts/Remediations)
- Category and publisher columns
- Auto-connect on startup with status bar indicator
- PolicyId extraction for HealthScripts events

Fixes:
- HRESULT error code handling (low 16-bit extraction)
- EvtRender buffer retry for large events
- Status bar shows correct workspace labels
- Hide FileSidebar in Event Log workspace

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: gate devtools and progress events for cross-platform CI

- Gate open_devtools behind #[cfg(all(debug_assertions, desktop))]
- Gate EvtxQueryProgress, Serialize, Emitter behind #[cfg(target_os = "windows")]
- Fixes cargo check on Ubuntu CI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address remaining Copilot PR #82 review comments, update changelog

Resolve 4 outstanding Copilot review issues plus changelog updates:

- DiffConfigDialog: filter to log-only tabs, validate selections exist
- FileSidebar: filter directories and uncached files before merge
- session.ts: replace unsafe cast with field-by-field validation and defaults
- session-restore: load files individually for per-tab restore, restore
  active tab index and scroll positions

Update changelog with all unreleased features, PR references (#72, #78,
#79, #81, #82), and new Security section for CI permissions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add workspace registry design spec

Defines a pluggable workspace registry to replace 25+ scattered if/else
chains across 8 frontend files with centralized, type-safe definitions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add workspace registry implementation plan (Phase 1-2)

9 tasks covering foundation types, registry, and sysmon migration
as the template workspace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(workspaces): add WorkspaceDefinition types

* feat(workspaces): add central workspace registry

* refactor(sysmon): move sysmon types to src/workspaces/sysmon/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(sysmon): move sysmon store to src/workspaces/sysmon/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(sysmon): move sysmon components to src/workspaces/sysmon/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(sysmon): move analysis progress hook to src/workspaces/sysmon/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(sysmon): extract SysmonSidebar to src/workspaces/sysmon/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(workspaces): register sysmon as first workspace definition

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: add workspace registry Phase 3 implementation plan

6 tasks: shim definitions, AppShell/FileSidebar/ui-store/Toolbar refactors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(workspaces): add shim definitions for all workspaces

Creates shim WorkspaceDefinition objects for the 7 remaining workspaces
(log, intune, new-intune, dsregcmd, macos-diag, deployment, event-log),
exports LogSidebar/IntuneSidebar/DsregcmdSidebar from FileSidebar.tsx,
and registers all 8 workspaces in the workspace registry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(appshell): use workspace registry for component routing

Replace the 8-way if/else chain in renderWorkspace() with a registry
lookup + Suspense for all non-log workspaces. Log workspace inline
rendering (DiffView, RegistryViewer, folder overlay, InfoPane) is
preserved as a special case. TabStrip and FindBar conditionals now
consult workspace capabilities flags instead of hard-coding activeView.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(sidebar): use workspace registry for sidebar routing

Replace the ternary chain (isIntuneWorkspace / activeView === 'sysmon'
checks) with a registry lookup via getWorkspace(activeView).sidebar, and
drive the footer bar from capabilities.footerBar. Remove now-unused
SysmonSidebar direct import and isIntuneWorkspace import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(ui-store): delegate platform gating to workspace registry

Remove WORKSPACE_PLATFORM_MAP constant and inline filter logic from
getAvailableWorkspaces(). Delegate to getRegistryWorkspaces() from
the workspace registry instead, mapping WorkspaceDefinition[] back
to WorkspaceId[] to preserve the existing public API surface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(toolbar): use workspace registry for labels and file filters

Replace WORKSPACE_LABELS, getOpenFileDialogFilters(), and
getOpenActionLabels() with direct lookups from getWorkspace() in the
workspace registry, eliminating ~75 lines of duplicated metadata.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(dsregcmd): migrate workspace to src/workspaces/dsregcmd/

Move all dsregcmd-specific files into src/workspaces/dsregcmd/ to make
the workspace fully self-contained, following the same pattern as sysmon.

- git mv types/dsregcmd.ts → workspaces/dsregcmd/types.ts
- git mv stores/dsregcmd-store.ts → workspaces/dsregcmd/dsregcmd-store.ts
- git mv components/dsregcmd/* → workspaces/dsregcmd/ (7 files)
- Extract DsregcmdSidebar from FileSidebar.tsx into workspaces/dsregcmd/DsregcmdSidebar.tsx
- Update index.ts shim to use local ./ imports
- Update all external importers (Toolbar, StatusBar, EvidenceBundleDialog,
  commands.ts, dsregcmd-source.ts, dsregcmd-store.test.ts, event-log/index.ts)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(event-log): migrate workspace to src/workspaces/event-log/

Move types, store, and all 7 components out of src/types/, src/stores/,
and src/components/event-log-workspace/ into the unified workspace directory.
Update all internal imports to use relative paths within the workspace.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(macos-diag): migrate workspace to src/workspaces/macos-diag/

Move types, store, and all 9 components from their scattered locations
(src/types/, src/stores/, src/components/macos-diag/) into the unified
workspace directory src/workspaces/macos-diag/. Update all internal
and external import paths accordingly. TypeScript passes clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(deployment): migrate workspace to src/workspaces/deployment/

Moves deployment-store.ts and all 3 component files (DeploymentWorkspace,
DeploymentErrorCard, DeploymentSuccessTable) from their legacy locations into
src/workspaces/deployment/. Updates all import paths in the moved files,
the workspace index shim, StatusBar.tsx, and both dynamic imports in Toolbar.tsx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(intune): migrate workspace to src/workspaces/intune/

Moves all 19 intune components, the intune store (1,095 lines), types,
hook, and test file from their scattered locations into the consolidated
src/workspaces/intune/ directory. Extracts IntuneSidebar from
FileSidebar.tsx into its own file with helpers inlined. Updates all
importers across layout, dialogs, hooks, and lib modules. Both the
intune and new-intune workspace shims now reference local workspace paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: remove empty component directories after workspace migration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: add .superpowers/ to gitignore, remove tracked artifacts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: extract SourceSummaryCard to shared component, consolidate getBaseName

- Create src/components/common/sidebar-primitives.tsx with SourceSummaryCard,
  SourceStatusNotice, SectionHeader, EmptyState, and SidebarActionButton
- Remove inline copies of all five components from FileSidebar, IntuneSidebar,
  DsregcmdSidebar, and SysmonSidebar; import from shared module instead
- Widen canonical getBaseName signature to string | null | undefined
- Remove exported getBaseName from log-store; import from file-paths instead
- Update all callers in log-source, dsregcmd-source, EvidenceBundleDialog,
  StatusBar, IntuneSidebar, SysmonSidebar, and FileSidebar to use file-paths
- Also removes local getDirectoryName copy from EvidenceBundleDialog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(ui-store): replace getUiChromeStatus if/else chain with registry lookup

Add statusLabel to WorkspaceDefinition; set overrides on log, intune, and
new-intune workspaces. getUiChromeStatus now resolves labels via getWorkspace()
and branches only on capabilities.detailsPane, eliminating the 8-way if/else.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(toolbar): wire onOpenSource handlers and capability-based commandState

Move workspace-specific analysis logic (intune, dsregcmd, sysmon, deployment)
from Toolbar.tsx into each workspace's onOpenSource in its definition. Replace
the openSourceForWorkspace if/else chain with a registry lookup. Add knownSources
and tailing to WorkspaceCapabilities and use them in commandState instead of
hardcoded workspace ID checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: update evtx-store import path after workspace migration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address Copilot PR #84 review comments

- event-log: remove incorrect DsregcmdSidebar, fix file filters to EVTX
- deployment: handle file sources by analyzing parent directory
- types: move IntuneTimestampBounds to shared types to break circular dep

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adamgell
adamgell deleted the copilot/fix-unused-mut-variables branch July 13, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants