Skip to content

Comments

fix: dashboard and init improvements#56

Merged
sehwan505 merged 5 commits intomainfrom
fix/dashboard-and-init-improvements
Dec 13, 2025
Merged

fix: dashboard and init improvements#56
sehwan505 merged 5 commits intomainfrom
fix/dashboard-and-init-improvements

Conversation

@baeyc0510
Copy link
Contributor

Summary

  • Fix MCP RBAC to use .env CURRENT_ROLE instead of git user info
  • Update category dropdowns immediately after add/edit/delete without page refresh
  • Improve import modal styling (centered with appropriate width)
  • Improve MCP tool selection UX during sym init (Enter to toggle, Submit to confirm)
  • Add list_category requirement before list_convention in MCP instructions
  • Add category definitions to all policy templates for auto-creation on template apply

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements several improvements to the Symphony dashboard and MCP initialization process, focusing on better UX and RBAC configuration.

Key Changes:

  • Updates RBAC to use .env CURRENT_ROLE instead of git user info for more reliable role management
  • Implements real-time category dropdown updates in the policy editor without page refresh
  • Improves MCP tool selection during sym init with Enter-to-toggle UX and Submit confirmation
  • Adds pre-defined category definitions to policy templates for automatic category creation

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/server/static/policy-editor.js Adds updateRuleCategorySelects() function and calls it after category operations to keep dropdowns in sync
internal/server/static/index.html Adjusts import modal width from full-width responsive to fixed 28rem for better centering
internal/policy/templates/vue-template.json Adds category definitions array (naming, formatting, error_handling, performance)
internal/policy/templates/typescript-template.json Adds category definitions array (error_handling, naming, formatting, documentation)
internal/policy/templates/react-template.json Adds category definitions array (naming, error_handling, formatting, performance)
internal/policy/templates/demo-template.json Adds category definitions array (naming, error_handling)
internal/mcp/server.go Refactors getRBACInfo() to use .env CURRENT_ROLE instead of git user information
internal/cmd/survey_templates.go Removes unused multiselect template, adds new select template without message output
internal/cmd/mcp_register.go Replaces multiselect with custom toggle-based selection using selectToolsWithEnterToggle(), updates MCP instructions to require list_category before list_convention

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

{"name": "naming", "description": "Naming conventions for components and files"},
{"name": "formatting", "description": "Code formatting and Composition API structure"},
{"name": "error_handling", "description": "Error handling and reactive state management"},
{"name": "performance", "description": "Performance optimization and computed properties"}
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The category array defines "naming", "formatting", "error_handling", and "performance", but rule with id "3" (line 38) uses category "documentation" which is not defined in the category array. This will result in the rule being assigned to a non-existent category. Add the "documentation" category to the category array or change the rule's category to one of the defined categories.

Suggested change
{"name": "performance", "description": "Performance optimization and computed properties"}
{"name": "performance", "description": "Performance optimization and computed properties"},
{"name": "documentation", "description": "Prop types, default values, and code documentation"}

Copilot uses AI. Check for mistakes.
{"name": "error_handling", "description": "Type safety and error handling rules"},
{"name": "naming", "description": "Naming conventions for types, interfaces, and variables"},
{"name": "formatting", "description": "Code formatting and module structure"},
{"name": "documentation", "description": "Documentation rules (JSDoc, type annotations)"}
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The category array defines "error_handling", "naming", "formatting", and "documentation", but rules with id "5" (line 47) and id "7" (line 57) use category "performance" which is not defined in the category array. This will result in these rules being assigned to a non-existent category. Add the "performance" category to the category array or change these rules' categories to one of the defined categories.

Suggested change
{"name": "documentation", "description": "Documentation rules (JSDoc, type annotations)"}
{"name": "documentation", "description": "Documentation rules (JSDoc, type annotations)"},
{"name": "performance", "description": "Performance optimization and best practices"}

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@sehwan505 sehwan505 left a comment

Choose a reason for hiding this comment

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

LGTM


// selectToolsWithEnterToggle allows users to select tools using Enter key to toggle
// and "Submit" option to confirm selection
func selectToolsWithEnterToggle(tools []string) []string {
Copy link
Contributor

Choose a reason for hiding this comment

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

근데 이거 원래 이렇게 직접 만들어야 함? cobra에서 제공 안하고?

@sehwan505 sehwan505 merged commit 6e0742f into main Dec 13, 2025
9 checks passed
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