Skip to content

Feature/timeline and delegations#2

Merged
JM2K69 merged 8 commits into
masterfrom
feature/timeline-and-delegations
Jun 2, 2026
Merged

Feature/timeline and delegations#2
JM2K69 merged 8 commits into
masterfrom
feature/timeline-and-delegations

Conversation

@JM2K69

@JM2K69 JM2K69 commented Jun 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

JM2K69 added 8 commits June 2, 2026 07:14
- Models: DomainSnapshot, ADChangeItem (ChangeType enum), ADDelegation (RightCategory/TrusteeType enums)
- ADObject: add Delegations property (ObservableCollection<ADDelegation>)
- Services: ADDiffService (Compare/Flatten/DetectChanges)
- Services: ADImportPowerShellService — export ACL delegations in PS script (PasswordReset, AccountUnlock, ComputerManagement, AttributeWrite, FullControl)
- ViewModels: DomainTimelineViewModel, DelegationsViewModel
- Views: DomainTimelineWindow, DelegationsWindow (DataGrid-based)
- MainWindow: Analyse menu (Ctrl+T Timeline, Ctrl+D Delegations)
- MainWindowViewModel: RootObject property
- csproj: add Avalonia.Controls.DataGrid 12.0.0
- App.axaml: include DataGrid Fluent theme
Copilot AI review requested due to automatic review settings June 2, 2026 09:04
@JM2K69 JM2K69 merged commit afb0334 into master Jun 2, 2026
1 check passed
@JM2K69 JM2K69 deleted the feature/timeline-and-delegations branch June 2, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds two new analysis capabilities to SMAD-X: (1) a “Domain Timeline” window to compare two exported domain snapshots and list changes, and (2) end-to-end support for AD ACL-based delegations (import, model, UI, graph visualization).

Changes:

  • Introduces a snapshot diff pipeline (models + diff service + timeline UI + CSV export).
  • Adds AD delegation collection to the data model, PowerShell import output, and a dedicated Delegations UI with CSV export.
  • Extends the graph view to render/filter delegation edges and surfaces delegation presence in the main TreeView.

Reviewed changes

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

Show a summary per file
File Description
SMAD-X/Views/MainWindow.axaml.cs Adds click handlers to open the new Timeline and Delegations windows.
SMAD-X/Views/MainWindow.axaml Adds “Analyse” menu items and a TreeView badge for delegation presence.
SMAD-X/Views/GraphWindow.axaml Refactors toolbar layout and adds a “Delegations” graph filter checkbox.
SMAD-X/Views/DomainTimelineWindow.axaml.cs Implements file pickers and CSV export wiring for the timeline window.
SMAD-X/Views/DomainTimelineWindow.axaml New Timeline UI (file pickers, compare button, filters, DataGrid, status).
SMAD-X/Views/DelegationsWindow.axaml.cs Adds CSV export wiring and optional load-from-tree initialization.
SMAD-X/Views/DelegationsWindow.axaml New Delegations UI (stats, filters, DataGrid, export, status).
SMAD-X/ViewModels/MainWindowViewModel.cs Exposes RootObject for passing the loaded tree into DelegationsWindow.
SMAD-X/ViewModels/GraphViewModel.cs Adds ShowDelegations and passes it into graph filter construction.
SMAD-X/ViewModels/DomainTimelineViewModel.cs Implements snapshot loading, diff execution, filtering, and CSV export.
SMAD-X/ViewModels/DelegationsViewModel.cs Implements delegation collection, filtering, stats, and CSV export.
SMAD-X/SMAD-X.csproj Adds Avalonia DataGrid package reference.
SMAD-X/Services/LocalizationService.cs Adds localization strings for delegation graph filter + delegation group descriptions.
SMAD-X/Services/ADImportPowerShellService.cs Extends generated PowerShell to export delegations into JSON.
SMAD-X/Services/ADDiffService.cs New diff service comparing snapshots incl. delegations.
SMAD-X/Services/ADDataService.cs Adds delegation groups + sample delegations into generated structures.
SMAD-X/Models/DomainSnapshot.cs New snapshot model used by the timeline comparison feature.
SMAD-X/Models/ADTreeNode.cs Adds delegation-derived properties for TreeView badges/tooltips.
SMAD-X/Models/ADObject.cs Adds Delegations collection to AD objects.
SMAD-X/Models/ADDelegation.cs New delegation model and related enums.
SMAD-X/Models/ADChangeItem.cs New diff item model used by the timeline UI.
SMAD-X/Helpers/LocalizationProxy.cs Exposes the new graph delegations filter localization key.
SMAD-X/Graph/GraphFilter.cs Adds ShowDelegations to graph filtering options.
SMAD-X/Graph/GraphEdge.cs Adds delegation edge type and label handling.
SMAD-X/Graph/GraphCanvas.cs Adds delegation edge color and legend entry.
SMAD-X/Graph/GraphBuilder.cs Builds delegation edges (trustee → target) when enabled by filter.
SMAD-X/App.axaml Includes DataGrid Fluent theme resources.
ROADMAP.md Documents the intended design/steps for timeline + delegations features.

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

Comment thread SMAD-X/Views/DelegationsWindow.axaml
Comment on lines +82 to +85
<MenuItem Header="Analyse">
<MenuItem Header="Domain Timeline (Ctrl+T)" Click="OnTimelineClick" InputGesture="Ctrl+T"/>
<MenuItem Header="Delegations (Ctrl+D)" Click="OnDelegationsClick" InputGesture="Ctrl+D"/>
</MenuItem>
Comment on lines +171 to +176
// Use "Trustee|Right|Target" as a stable key
static string Key(ADDelegation d) =>
$"{d.TrusteeName}|{d.Right}|{d.TargetDN}".ToLowerInvariant();

var oldKeys = before.Delegations.ToDictionary(Key);
var newKeys = after.Delegations.ToDictionary(Key);
Comment on lines +215 to +221
L(s, " $trusteeType = 'Group'");
L(s, " try {");
L(s, " $tObj = Get-ADObject -Filter { SAMAccountName -eq $trustee.Split('\\\\')[-1] } -Properties objectClass -ErrorAction SilentlyContinue");
L(s, " if ($tObj.objectClass -eq 'user') { $trusteeType = 'User' }");
L(s, " elseif ($tObj.objectClass -eq 'computer') { $trusteeType = 'Computer' }");
L(s, " } catch {}");
L(s, " $trusteeSam = $trustee.Split('\\\\')[-1]");
var ggTier1OperatorsFresh = new ADObject("GG-Tier1-Operators", ADObjectType.Group)
{
Description = loc["Desc.Delegation.GGTier1Operators"],
Tier = GetTier("Tier 0"),
Comment thread SMAD-X/SMAD-X.csproj
Comment on lines 29 to 33
<PackageReference Include="Avalonia" Version="12.0.3" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="12.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="12.0.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.3" />
Copilot AI mentioned this pull request Jun 2, 2026
6 tasks
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.

2 participants