Skip to content

Policies tab view#785

Merged
jsbroks merged 2 commits intomainfrom
cursor/policies-tab-view-021a
Feb 5, 2026
Merged

Policies tab view#785
jsbroks merged 2 commits intomainfrom
cursor/policies-tab-view-021a

Conversation

@jsbroks
Copy link
Copy Markdown
Member

@jsbroks jsbroks commented Feb 5, 2026

Add a new 'Policies' tab to the deployment details page to display policies and their associated resources.


Open in Cursor Open in Web

Summary by CodeRabbit

New Features

  • Added a "Policies" tab to the deployment navigation interface
  • Introduced a new policies page displaying deployment policy details, including rules, targets, enabled/disabled status, priority, and related resources

Co-authored-by: Justin Brooks <jsbroks@gmail.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Feb 5, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 5, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR adds a "policies" tab to the deployment navbar and introduces a new policies page for displaying deployment policy details. The page fetches policies and release targets, displays them in a collapsible table structure showing policy metadata, rules, and associated resources.

Changes

Cohort / File(s) Summary
Deployment Navigation
apps/web/app/routes/ws/deployments/_components/DeploymentsNavbarTabs.tsx
Added "policies" to the DeploymentTab union type and extended the route recognition logic to identify the /policies path, registering the new tab in the navbar tabs system.
Policies Page Implementation
apps/web/app/routes/ws/deployments/page.$deploymentId.policies.tsx
New page component fetching and displaying deployment policies with collapsible policy groups showing rule details, targets, and associated resources. Includes helper functions for formatting rule details, selectors, and resource descriptions.

Sequence Diagram

sequenceDiagram
    participant User as User
    participant Page as DeploymentPolicies<br/>Page
    participant TRPC as TRPC Client
    participant Render as Policy Renderer
    
    User->>Page: Navigate to /deployments/{id}/policies
    Page->>TRPC: Fetch policies list
    TRPC-->>Page: Return policies data
    Page->>TRPC: Fetch release targets
    TRPC-->>Page: Return targets mapping
    Page->>Page: Sort policies by name
    Page->>Page: Resolve targets per policy<br/>(match policy to targets)
    Page->>Render: Map policies to<br/>PolicyReleaseTargetsGroup
    Render->>Render: For each policy:<br/>render metadata, rules,<br/>and resources
    Render-->>User: Display policy table<br/>with collapsible details
    User->>Render: Toggle policy expansion
    Render->>Render: Show/hide rules<br/>and resources
    Render-->>User: Update view
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A new tab hops into view,
Policies displayed in rows anew,
With rules and targets all aligned,
Resources linked, details refined,
The navbar grows, the code runs true! 🌿

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/policies-tab-view-021a

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: Justin Brooks <jsbroks@gmail.com>
@jsbroks jsbroks marked this pull request as ready for review February 5, 2026 14:40
@jsbroks jsbroks merged commit bc6dea1 into main Feb 5, 2026
6 of 7 checks passed
@jsbroks jsbroks deleted the cursor/policies-tab-view-021a branch February 5, 2026 14:40
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