Cursor rule
.cursor/rules/ui.mdcGuidelines for implementing and maintaining user interface components
Cursor rules
Quality
62/100
Scores the file, not the repository.Length
478 words
7 headings · 6 code blocksRepository
192
— · pushed 309 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# User Interface Implementation Guidelines89## Core UI Component Principles1011- **Function Scope Separation**:12 - ✅ DO: Keep display logic separate from business logic13 - ✅ DO: Import data processing functions from other modules14 - ❌ DON'T: Include task manipulations within UI functions15 - ❌ DON'T: Create circular dependencies with other modules1617- **Standard Display Pattern**:18```javascript19 // ✅ DO: Follow this pattern for display functions20 /**21 * Display information about a task22 * @param {Object} task - The task to display23 */24 function displayTaskInfo(task) {25 console.log(boxen(26 chalk.white.bold(`Task: #${task.id} - ${task.title}`),27 { padding: 1, borderColor: 'blue', borderStyle: 'round' }28 ));29 }30```3132## Visual Styling Standards3334- **Color Scheme**:35 - Use `chalk.blue` for informational messages36 - Use `chalk.green` for success messages37 - Use `chalk.yellow` for warnings38 - Use `chalk.red` for errors39 - Use `chalk.cyan` for prompts and highlights40 - Use `chalk.magenta` for subtask-related information4142- **Box Styling**:43```javascript44 // ✅ DO: Use consistent box styles by content type45 // For success messages:46 boxen(content, {47 padding: 1,48 borderColor: 'green',49 borderStyle: 'round',50 margin: { top: 1 }51 })5253 // For errors:54 boxen(content, {55 padding: 1,56 borderColor: 'red',57 borderStyle: 'round'58 })5960 // For information:61 boxen(content, {62 padding: 1,63 borderColor: 'blue',64 borderStyle: 'round',65 margin: { top: 1, bottom: 1 }66 })67```6869## Table Display Guidelines7071- **Table Structure**:72 - Use [`cli-table3`](mdc:node_modules/cli-table3/README.md) for consistent table rendering73 - Include colored headers with bold formatting74 - Use appropriate column widths for readability7576```javascript77 // ✅ DO: Create well-structured tables78 const table = new Table({79 head: [80 chalk.cyan.bold('ID'),81 chalk.cyan.bold('Title'),82 chalk.cyan.bold('Status'),83 chalk.cyan.bold('Priority'),84 chalk.cyan.bold('Dependencies')85 ],86 colWidths: [5, 40, 15, 10, 20]87 });8889 // Add content rows90 table.push([91 task.id,92 truncate(task.title, 37),93 getStatusWithColor(task.status),94 chalk.white(task.priority || 'medium'),95 formatDependenciesWithStatus(task.dependencies, allTasks, true)96 ]);9798 console.log(table.toString());99```100101## Loading Indicators102103- **Animation Standards**:104 - Use [`ora`](mdc:node_modules/ora/readme.md) for spinner animations105 - Create and stop loading indicators correctly106107```javascript108 // ✅ DO: Properly manage loading state109 const loadingIndicator = startLoadingIndicator('Processing task data...');110 try {111 // Do async work...112 stopLoadingIndicator(loadingIndicator);113 // Show success message114 } catch (error) {115 stopLoadingIndicator(loadingIndicator);116 // Show error message117 }118```119120## Helper Functions121122- **Status Formatting**:123 - Use `getStatusWithColor` for consistent status display124 - Use `formatDependenciesWithStatus` for dependency lists125 - Use `truncate` to handle text that may overflow display126127- **Progress Reporting**:128 - Use visual indicators for progress (bars, percentages)129 - Include both numeric and visual representations130131```javascript132 // ✅ DO: Show clear progress indicators133 console.log(`${chalk.cyan('Tasks:')} ${completedTasks}/${totalTasks} (${completionPercentage.toFixed(1)}%)`);134 console.log(`${chalk.cyan('Progress:')} ${createProgressBar(completionPercentage)}`);135```136137## Command Suggestions138139- **Action Recommendations**:140 - Provide next step suggestions after command completion141 - Use a consistent format for suggested commands142143```javascript144 // ✅ DO: Show suggested next actions145 console.log(boxen(146 chalk.white.bold('Next Steps:') + '\n\n' +147 `${chalk.cyan('1.')} Run ${chalk.yellow('task-manager list')} to view all tasks\n` +148 `${chalk.cyan('2.')} Run ${chalk.yellow('task-manager show --id=' + newTaskId)} to view details`,149 { padding: 1, borderColor: 'cyan', borderStyle: 'round', margin: { top: 1 } }150 ));151```152153Refer to [`ui.js`](mdc:scripts/modules/ui.js) for implementation examples and [`new_features.mdc`](mdc:.cursor/rules/new_features.mdc) for integration guidelines.
Also in skindhu/AI-TASK-MANAGER
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| skindhu/AI-TASK-MANAGER.cursor/rules/architecture.mdc · 192 | Cursor rules | testarchtesting-strategy | 42/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/commands.mdc · 192 | Cursor rules | stylearch | 62/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/cursor_rules.mdc · 192 | Cursor rules | no sections | 36/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/dependencies.mdc · 192 | Cursor rules | arch | 66/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/dev_workflow.mdc · 192 | Cursor rules | setup | 52/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/new_features.mdc · 192 | Cursor rules | testtesting-strategydocs | 65/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/self_improve.mdc · 192 | Cursor rules | no sections | 36/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/tasks.mdc · 192 | Cursor rules | arch | 70/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/tests.mdc · 192 | Cursor rules | teststylearchtesting-strategy+1 | 74/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGER.cursor/rules/utilities.mdc · 192 | Cursor rules | securitydocs | 54/100 | 3 days ago | |
| skindhu/AI-TASK-MANAGERassets/.windsurfrules · 192 | Windsurf rules | setup | 40/100 | 3 days ago |
Diff against .cursor/rules/architecture.mdc Diff against .cursor/rules/commands.mdc Diff against .cursor/rules/cursor_rules.mdc Diff against .cursor/rules/dependencies.mdc Diff against .cursor/rules/dev_workflow.mdc Diff against .cursor/rules/new_features.mdc Diff against .cursor/rules/self_improve.mdc Diff against .cursor/rules/tasks.mdc Diff against .cursor/rules/tests.mdc Diff against .cursor/rules/utilities.mdc Diff against assets/.windsurfrules
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
