Add az-Show-RecentActivity — merged "posted or tagged" work-item view#151
Add az-Show-RecentActivity — merged "posted or tagged" work-item view#151jdschleicher wants to merge 3 commits into
Conversation
Adds a new "recent activity" view that unions the work items the user posted on (new activity dataset: System.ChangedBy = @me) with items they were @-tagged in (existing mentions cache), dedupes by Id, tags each row Posted/Tagged/Both, filters to non-closed, and sorts newest-first by ChangedDate. - azdevops_paths.ps1: activity.json cache path, ActivityQuery config path, default activity WIQL, activity in query defaults + Get-AzDevOpsWiql ValidateSet - azdevops_sync.ps1: activity dataset in Get-AzDevOpsSyncDatasets - azdevops_views.ps1: ConvertFrom-AzDevOpsActivityItem, Read-AzDevOpsActivityCache, Merge-AzDevOpsActivityRows, az-Show-RecentActivity - azdevops_help.ps1: az-help catalog entry + sync purpose string Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GN1LLuN9FtDj1F9X9itcWg
🐚 Senior Bash EngineerSummaryThis PR changes only PowerShell files ( VerdictAPPROVE — no bash files in this diff Generated by Claude Code |
🧼 Senior Clean-Code EngineerSummaryFour Findings
Duplication Map
Function Sizes
CLAUDE.md rule checks
VerdictAPPROVE — well-factored, no blocking duplication. The new functions correctly reuse the shared view/sort/render/action helpers and follow the established per-dataset pattern; the only notes are two LOW suggestions, one of which (the converter "duplication") is the repo's deliberate convention and should be left alone. Generated by Claude Code |
💠 Senior PowerShell EngineerSummaryFour Findings
Detailed checksApproved verbs — PASS. All four new function names use approved verbs: Parameter binding — PASS. Output streams — PASS. Error handling / cache absence — PASS. Merge dictionary (plain hashtable keyed by [int] Id) — CORRECT. Confirmed the design rationale: a plain Side effects / profile load — PASS. All additions are inside function bodies or WIQL dataset wiring — PASS. Dot-Sourcing Wire-UpWIRED — no new Approved VerbsPASS — all new function names use approved verbs (Show, ConvertFrom, Read, Merge). VerdictAPPROVE — no blocking issues. Two LOW/informational notes only (both-source date discard is an intentional, documented design choice). Generated by Claude Code |
✅ Criteria Check — #149: Add az-Show-RecentActivitySyntax Checks
Acceptance CriteriaNew
Summary
Manual Verification Checklist (fresh PowerShell terminal)
Verdict✅ PASS — all 11 automated criteria verified; 1 parse gate skipped (no pwsh in CI env); 4 items need hands-on terminal testing. Generated by Claude Code |
- README: add az-Show-RecentActivity to the Azure DevOps prose enumeration and the usage-examples block - azure-devops-diagrams.md: add the new view + activity dataset/cache to the high-level architecture (#1), sync dataset fan-out (#4, five->six), cache consumers note (#5), and function dependency map (#12) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GN1LLuN9FtDj1F9X9itcWg
🛡️ Security AuditVerdict: PASS — no security vulnerabilities found.The change adds a static WIQL query, a cache-only read view, and dataset wiring that reuses existing, already-hardened helpers. Each focus area was traced end-to-end:
No findings reached the HIGH/MEDIUM confidence threshold. Generated by Claude Code |
…-activity-mp0lkm # Conflicts: # powcuts_by_cli/azdevops_help.ps1
Contents
How it works
az-Sync-AzDevOpsCachenow fills a newactivity.jsoncache from a[System.ChangedBy] = @MeWIQL. On demand,az-Show-RecentActivityreads that cache plus the existingmentions.json, merges them (dedupe by Id, tag each rowPosted/Tagged/Both), filters to non-closed, sorts newest-first, and hands the grid selection to the shared open/create-child action. New nodes are:::pub/:::priv; pre-existing helpers are referenced by name only.flowchart TD Sync([az-Sync-AzDevOpsCache]):::pub ActDS["activity dataset<br/>WIQL System.ChangedBy = @Me"]:::priv ActJson[(activity.json)]:::io MenJson[(mentions.json)]:::io Entry([az-Show-RecentActivity]):::pub ReadAct["Read-AzDevOpsActivityCache<br/>→ ConvertFrom-AzDevOpsActivityItem"]:::priv ReadM["Read-AzDevOpsMentionsCache<br/>(existing)"]:::priv Bail{neither cache?} Abort([return — missing-cache hint]) Merge["Merge-AzDevOpsActivityRows<br/>dedupe by Id · Reason Posted/Tagged/Both"]:::priv Filter["Select-AzDevOpsActiveItems<br/>non-closed (existing)"]:::priv Sort["Sort-AzDevOpsByDateDesc<br/>newest by ChangedDate (existing)"]:::priv Show["Show-AzDevOpsRows grid (existing)"]:::priv Action["Invoke-AzDevOpsRowAction<br/>open / create child (existing)"]:::priv Done([open in browser]) Sync --> ActDS --> ActJson Entry --> ReadAct -.reads.-> ActJson Entry --> ReadM -.reads.-> MenJson ReadAct --> Bail ReadM --> Bail Bail -- both null --> Abort Bail -- some data --> Merge ReadAct --> Merge ReadM --> Merge Merge --> Filter --> Sort --> Show --> Action --> Done classDef pub fill:#1f3a5f,stroke:#4ea3ff,color:#fff classDef priv fill:#3a3a3a,stroke:#999,color:#fff classDef io fill:#5a4a1a,stroke:#e0c060,color:#fffSummary
Adds
az-Show-RecentActivity, a single selectable grid of the non-closed Azure DevOps work items you've been active on lately — items you posted/commented on (newactivitydataset:[System.ChangedBy] = @Me) unioned with items you were @-tagged in (existingmentionscache). Rows are deduped by Id, tagged with aReasoncolumn (Posted/Tagged/Both), filtered to non-closed states, and sorted newest-first byChangedDate. Selection flows through the sharedInvoke-AzDevOpsRowAction(open in browser / create child) like the otheraz-Show-*views.Issue
Closes #149
Changes
powcuts_by_cli/azdevops_paths.ps1— newactivity.jsoncache path,ActivityQueryconfig path,$script:AzDevOpsDefaultActivityWiql([System.ChangedBy] = @Me),activityentry inGet-AzDevOpsQueryDefaults, and'activity'added to theGet-AzDevOpsWiqlValidateSet + cache-listing doc comment.powcuts_by_cli/azdevops_sync.ps1— newactivitydataset inGet-AzDevOpsSyncDatasets, soaz-Sync-AzDevOpsCachewritesactivity.json.powcuts_by_cli/azdevops_views.ps1—ConvertFrom-AzDevOpsActivityItem,Read-AzDevOpsActivityCache,Merge-AzDevOpsActivityRows, and the publicaz-Show-RecentActivity.powcuts_by_cli/azdevops_help.ps1—az-helpcatalog entry for the new view + updated sync purpose string.README.md—az-Show-RecentActivityadded to the Azure DevOps prose + usage examples.docs/azure-devops-diagrams.md— new view +activitydataset/cache reflected in the architecture (Feature/oscheckforopen #1), sync fan-out (updates #4, five→six), cache-consumers note (adjustments to make reinit a function that works with both bashrc and… #5), and dependency map (Add New-AzDevOpsUserStory with interactive parent-feature + iteration/area pickers #12).Design notes
[System.ChangedBy] = @Meis a best-effort proxy for "I posted/commented on it" — WIQL has no first-class "I authored a revision" predicate. Accepted for v1 (see the issue's open question).[ordered], whose[int]indexer is positional rather than key-based; the caller re-sorts byChangedDate, so insertion order is irrelevant.Test Plan
az-Sync-AzDevOpsCachereports anactivitydataset row count and writes~/.bashcuts-az-devops-app/cache/activity.jsonaz-Show-RecentActivityopens newest-first, no closed items,Reasoncolumn showsPosted/Tagged/Bothaz-Show-lists the new function🤖 Generated with Claude Code