Skip to content

refactor(teams_selection): centralize team selection in TeamSelectionService - #592

Open
sawankshrma wants to merge 6 commits into
devsecopsmaturitymodel:mainfrom
sawankshrma:global_team_selection
Open

sawankshrma wants to merge 6 commits into
devsecopsmaturitymodel:mainfrom
sawankshrma:global_team_selection

Conversation

@sawankshrma

@sawankshrma sawankshrma commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a TeamSelectionService as the single source of truth for the active team filter, used by the heatmap, report page/modal, and evidence components. Removes selectedTeams from ReportConfig (previously stored inside localStorage, now only persists per-session)

Changes:

  • TeamSelectionService has selectedTeams, effectiveTeams, selectedGroupName, and isAllSelected as computed signals.
  • CircularHeatmapComponent: derives fiiltersTeams/filtersTeamGroups from the service; syncs SectorService via effect()
  • ReportComponent/ReportConfigModalComponent: selectedTeams is pulled out of ReportConfig entirely. Team selection now flows through the service instead of being persisted config. The modal's result type changed from ReportConfig to { config, selectedTeams } since they're no longer the same object.
  • AddEvidenceModalComponent/EvidencePanelComponent: injects service directly instead of passing allTeams/teamGroups through dialog data
  • TeamSelectorComponent: makes selectedTeams a plain input, selectAllTeams()/deselectAllTeams()/selectGroup() just emit rather than mutate local state.

Follow-up changes: (Addersing Issue: #588)

  • Teams & Groups can now be reordered with up/down controls in edit mode. Team order is stored in the existing teams array; group order is preserved by rebuilding the group mapping in the selected order.

  • Team rename handling now tracks explicit rename actions instead of inferring renames from list positions. This prevents a reorder from being treated as a rename and incorrectly moving progress or evidence data.

  • Deleting a team continues to remove it only from the active team/group configuration; its stored progress and evidence is preserved by re-creating the same team name.

@sawankshrma
sawankshrma requested a review from vbakke September 7, 2026 21:55
@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had recent activity. 📆 It will be closed automatically in two weeks if no further activity occurs.

@github-actions github-actions Bot added the Stale label Oct 13, 2026
@wurstbrot

Copy link
Copy Markdown
Collaborator

Hi, what is the status?

@github-actions github-actions Bot removed the Stale label Oct 25, 2026
@sawankshrma
sawankshrma force-pushed the global_team_selection branch from 51bc7ca to 0ae4a2e Compare October 26, 2026 09:52
@sawankshrma

Copy link
Copy Markdown
Collaborator Author

Hi, what is the status?

Hi @wurstbrot, @vbakke, This PR is now ready to review :)

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