feat: data classification tags for pipelines#38
Merged
TerrifiedBug merged 9 commits intomainfrom Mar 7, 2026
Merged
Conversation
Contributor
Greptile SummaryThis PR adds a data classification tagging system for pipelines — team admins define available tags (PII, PHI, PCI-DSS, etc.), editors apply them to individual pipelines, and color-coded badges appear in the pipeline list for quick visual identification. All previously raised review concerns have been addressed in this revision. Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Admin as Admin (Settings UI)
participant Editor as Editor (Pipeline Settings)
participant TRPCTeam as tRPC team router
participant TRPCPipeline as tRPC pipeline router
participant DB as PostgreSQL
Admin->>TRPCTeam: updateAvailableTags({ teamId, tags })<br/>[ADMIN + withAudit]
TRPCTeam->>DB: UPDATE Team SET availableTags = tags
DB-->>TRPCTeam: updated Team
TRPCTeam-->>Admin: success
Editor->>TRPCTeam: getAvailableTags({ teamId })<br/>[VIEWER]
TRPCTeam->>DB: SELECT availableTags FROM Team
DB-->>TRPCTeam: availableTags[]
TRPCTeam-->>Editor: string[]
Editor->>TRPCPipeline: pipeline.update({ id, tags })<br/>[EDITOR + withAudit]
TRPCPipeline->>DB: SELECT id, tags, environment.teamId FROM Pipeline
DB-->>TRPCPipeline: existing pipeline
TRPCPipeline->>DB: SELECT availableTags FROM Team
DB-->>TRPCPipeline: availableTags[]
Note over TRPCPipeline: Validate only newly-added tags<br/>against availableTags
TRPCPipeline->>DB: UPDATE Pipeline SET tags = newTags
DB-->>TRPCPipeline: updated Pipeline
TRPCPipeline-->>Editor: success
Last reviewed commit: 5041b2f |
Add tags (Json) to Pipeline model and availableTags (Json) to Team model. Add team.updateAvailableTags and team.getAvailableTags tRPC procedures. Update pipeline.update to accept and validate tags against team's available tags. Include tags in pipeline.list response.
Pipeline list: show color-coded tag badges next to pipeline names. Pipeline settings: add Classification Tags multi-select dropdown populated from the team's available tags. Team settings: add Data Classification Tags card for admins to define/remove available tags per team. Pipeline get endpoint: include environment.teamId for tag resolution.
Document how admins define available tags per team, how editors apply tags to pipelines, and the color-coding scheme for tag badges.
- Reject duplicate tags in updateAvailableTags via Zod refine
- Add explicit NOT_FOUND when team lookup returns null during tag validation
- Move setNewTag("") into onSuccess to preserve input on mutation failure
When updating pipeline tags, only validate newly added tags against the team's available tags list. Previously, all submitted tags were validated, which blocked tag removal when a stale (deleted) tag was still present on the pipeline.
- Remove duplicate useTRPC, TanStack Query, and toast imports in pipeline-settings.tsx - Restore Trash2 and Plus icon imports for SliSettings sub-component - Add missing slis relation to Pipeline model in Prisma schema - Add missing PipelineHealthBadge component to pipelines list page - Fix componentKey reference (should be storeKey) in detail-panel.tsx
d7a53ab to
5041b2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tags(Json) field to Pipeline andavailableTags(Json) field to Team in the Prisma schema, with a corresponding database migrationteam.updateAvailableTags(ADMIN) andteam.getAvailableTags(VIEWER) tRPC procedures for managing team-level tag definitionspipeline.updateto accept and validatetagsagainst the team's available tags; includetagsinpipeline.listresponsedocs/public/user-guide/pipelines.mdTest plan
tagscolumn on Pipeline andavailableTagscolumn on Team are created