-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add avatars to client-side grid and separate task ID from name #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…les (#51) - Create FilterPresetsShowcase component with tabbed interface - Add BasicPresetExample showing system and user presets functionality - Add AdvancedPresetExample with multi-grid sync, URL sharing, and import/export - Add CustomUIExample demonstrating custom preset UI components - Add RealWorldExamples with sales dashboard, task manager, and analytics platform - Integrate new showcase into main demo application with "Filter Presets" tab - Add data generators for realistic demo scenarios - Include comprehensive documentation and API playground Implements all requirements from issue #51 for showcasing filter preset features with QuickFilterDropdown integration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This PR implements a comprehensive sharing system for filter presets with the following features: ## Features Added - **URL Sharing**: Share presets via compressed URLs with two modes: - Embedded mode: Full preset data compressed and included in URL - Reference mode: Only preset ID included in URL - **Export/Import**: Download and upload presets as JSON files - **Compression**: Achieves >50% size reduction using LZ-String - **ShareButton Component**: Ready-to-use UI component for sharing - **usePresetFromUrl Hook**: Auto-load presets from URLs - **Import Modes**: Replace, merge, or add when importing presets ## Implementation Details - Created modular utilities in src/utils/presetSharing/ - Built ShareButton component with copy-to-clipboard functionality - Implemented usePresetFromUrl hook for automatic preset loading - Added comprehensive test coverage (102 tests) - Updated documentation in README.md and llms.txt - Added demo example in components-showcase-complete.tsx ## Test Coverage - Compression utilities: 16 tests - URL serialization: 16 tests - URL parsing: 22 tests - Import/Export: 23 tests - ShareButton component: 14 tests - usePresetFromUrl hook: 11 tests - Total: 102 tests passing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add PresetManager class for managing system and user presets - Implement system presets (read-only, developer-defined) - Implement user presets (full CRUD, localStorage persistence) - Add template resolution for dynamic values ({{today}}, {{last7Days}}, etc.) - Add default preset management (one active preset at a time) - Update QuickFilterDropdown to support system presets with visual distinction - Add comprehensive test coverage for all preset functionality - Update documentation with preset system usage examples - Create demo showcasing preset system capabilities Closes #50 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…esets - Created complete documentation structure: - Getting Started guide with Quick Start and Core Concepts - API Reference for all preset-related components and hooks - Advanced Topics covering performance, storage, and security - Troubleshooting guide for common issues - Migration guide for existing users - Implemented test structure following TDD: - Unit tests for storage engine with localStorage mocking - Unit tests for URL serialization/parsing - Comprehensive E2E tests for save/load preset workflows - E2E tests for URL sharing functionality - TypeScript interfaces and type definitions - Updated README.md with filter presets feature section This establishes the foundation for implementing the filter presets feature with clear documentation and test coverage requirements.
- Add PresetSelector dropdown component for selecting saved presets - Add SavePresetDialog modal for saving current filter state as preset - Add PresetManager list view for managing all presets (edit/delete/export/import) - Add usePresets hook for centralized preset state management - Integrate presets with QuickFilterDropdown via enablePresets prop - Add comprehensive TypeScript types throughout - Include localStorage adapter for persistence - Support system presets (read-only) and user presets - Add keyboard navigation and accessibility support - Include import/export functionality for sharing presets 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ement' of /Users/ryan/ag-grid-worktrees/feature/48-create-ui-components-for-filter-preset-management into feature/filter-presets-integration
…s' of /Users/ryan/ag-grid-worktrees/feature/51-create-demo-showcase-and-integration-examples into feature/filter-presets-integration
- Add comprehensive .gitignore patterns for MADF files - Remove all MADF documentation and migration files from tracking - Remove bot workflow files and automation scripts - Remove .env file (contained exposed API tokens) - Remove temporary screenshots and watch files - Keep repository focused on the actual npm package
- Add deploy-rc-preview.yml for manual RC preview deployments - Add rc-integration-deploy.yml to automate PR creation for RCs - Enables quick preview of integrated features before release - Automates the creation of RC pull requests with all milestone features
- Document lessons learned from integrating 6 parallel PRs - Provide recommendations for MADF framework - Include automated workflows and testing strategies - Cover progressive integration and conflict prediction - Add implementation guide with example commands
- Fixed dynamic Tailwind class issue by using static color mappings - Added explicit background colors for each stat type (indigo, green, blue, amber) - Icons now have proper colored backgrounds with 10% opacity - Added unit tests to verify styling is correctly applied Fixes #27 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update data generator to use string IDs (e.g., 'UI-1234') - Separate task ID column from task name for better clarity - Enable avatar renderer for both client and server-side grids - Show ID column on client-side grid with monospace font - Adjust column widths for better layout Fixes #26
runs-on: ubuntu-latest | ||
# Only run if agent labels are involved | ||
if: | | ||
github.event_name == 'workflow_dispatch' || | ||
(github.event.label && startsWith(github.event.label.name, 'agent:')) || | ||
contains(github.event.issue.labels.*.name, 'agent:todo') || | ||
contains(github.event.issue.labels.*.name, 'agent:wip') || | ||
contains(github.event.issue.labels.*.name, 'agent:needs-review') || | ||
contains(github.event.issue.labels.*.name, 'agent:done') || | ||
contains(github.event.issue.labels.*.name, 'agent:error') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Sync agent status to project | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "🔄 Syncing agent status for issue/PR #${{ github.event.issue.number || github.event.pull_request.number }}" | ||
node scripts/sync-agent-status-to-project.js |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, we need to add a permissions
block to the workflow. This block should specify the least privileges required for the workflow to function correctly. Based on the workflow's functionality, it interacts with issues and pull requests, so the permissions should include contents: read
and issues: write
.
The permissions
block can be added at the root level of the workflow to apply to all jobs or within the specific job (sync-agent-status
) to scope permissions to that job only. In this case, adding it at the job level is more precise.
-
Copy modified lines R13-R15
@@ -12,2 +12,5 @@ | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
issues: write | ||
# Only run if agent labels are involved |
|
||
try { | ||
execSync( | ||
`gh issue comment ${issue} --body "${triggerComment.replace(/"/g, '\\"')}"`, |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, we need to ensure that backslashes in the triggerComment
string are properly escaped before passing it to the execSync
command. This can be achieved by adding a .replace(/\\/g, '\\\\')
step before escaping double quotes. This ensures that all backslashes are doubled, preventing them from being interpreted as escape characters in the shell command.
The updated code will replace both backslashes and double quotes in the triggerComment
string, ensuring it is safe to use in the shell command.
-
Copy modified line R87
@@ -86,3 +86,3 @@ | ||
execSync( | ||
`gh issue comment ${issue} --body "${triggerComment.replace(/"/g, '\\"')}"`, | ||
`gh issue comment ${issue} --body "${triggerComment.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`, | ||
{ stdio: 'inherit' } |
// Tmux session | ||
console.log('\n📺 Launching tmux session...'); | ||
const tmuxCmd = `node ${join(__dirname, 'launch-bot-army.js')} ${issueNumbers.join(' ')}`; | ||
execSync(tmuxCmd, { stdio: 'inherit' }); |
Check warning
Code scanning / CodeQL
Shell command built from environment values Medium
absolute path
|
||
try { | ||
const result = execSync( | ||
`gh issue create --title "Feature: ${feature}" --body "${trackingBody.replace(/"/g, '\\"')}" --label "enhancement" --label "priority: high" --label "area: components"`, |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, we need to ensure that both double quotes and backslashes are escaped in the trackingBody
string before it is passed to the execSync
function. This can be achieved by using a regular expression with the global flag (g
) to replace all occurrences of backslashes and double quotes. Alternatively, a well-tested library like shell-escape
can be used to sanitize the input, but for simplicity, we will implement the fix using regular expressions.
The replacement block will modify the trackingBody.replace
call to escape both backslashes and double quotes. Specifically, we will chain two replace
calls: one to escape backslashes and another to escape double quotes.
-
Copy modified line R128
@@ -127,3 +127,3 @@ | ||
const result = execSync( | ||
`gh issue create --title "Feature: ${feature}" --body "${trackingBody.replace(/"/g, '\\"')}" --label "enhancement" --label "priority: high" --label "area: components"`, | ||
`gh issue create --title "Feature: ${feature}" --body "${trackingBody.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}" --label "enhancement" --label "priority: high" --label "area: components"`, | ||
{ encoding: 'utf8' } |
]; | ||
|
||
const result = execSync( | ||
`gh issue create --title "${task.title}" --body "${issueBody.replace(/"/g, '\\"')}" ${labels.map(l => `--label "${l}"`).join(' ')}`, |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, we need to ensure that both double quotes and backslashes are properly escaped in the issueBody
string. This can be achieved by using a regular expression with the global flag (g
) to replace all occurrences of backslashes (\
) with double backslashes (\\
) and then escaping double quotes ("
). This ensures that the string is safe to use in the execSync
command.
The fix involves modifying the issueBody.replace
call on line 185 to include escaping for backslashes. Specifically, we will chain two replace
calls: one for backslashes and one for double quotes.
-
Copy modified line R185
@@ -184,3 +184,3 @@ | ||
const result = execSync( | ||
`gh issue create --title "${task.title}" --body "${issueBody.replace(/"/g, '\\"')}" ${labels.map(l => `--label "${l}"`).join(' ')}`, | ||
`gh issue create --title "${task.title}" --body "${issueBody.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}" ${labels.map(l => `--label "${l}"`).join(' ')}`, | ||
{ encoding: 'utf8' } |
|
||
try { | ||
execSync( | ||
`gh issue comment ${trackingIssue} --body "${updateBody.replace(/"/g, '\\"')}"`, |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, the updateBody.replace
call should be updated to escape backslashes in addition to double quotes. This can be achieved by chaining another replace
call to handle backslashes or by using a regular expression that escapes both characters in a single pass. A better approach is to use a well-tested library for escaping shell arguments, such as shell-escape
, but since we are limited to the shown code, we will implement the fix manually.
The fix involves:
- Escaping backslashes (
\
) by replacing them with double backslashes (\\
). - Ensuring that double quotes (
"
) are escaped as before.
The changes will be applied to the updateBody.replace
call on line 225.
-
Copy modified line R225
@@ -224,3 +224,3 @@ | ||
execSync( | ||
`gh issue comment ${trackingIssue} --body "${updateBody.replace(/"/g, '\\"')}"`, | ||
`gh issue comment ${trackingIssue} --body "${updateBody.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`, | ||
{ stdio: 'inherit' } |
const integrationTestPattern = '**/FilterPreset*.integration.test.{ts,tsx}'; | ||
try { | ||
const integrationTests = execSync( | ||
`find ${rootDir}/src -name "*.integration.test.ts" -o -name "*.integration.test.tsx" | wc -l`, |
Check warning
Code scanning / CodeQL
Shell command built from environment values Medium
absolute path
const issueNumber = issueMatch ? issueMatch[1] : work.number; | ||
|
||
execSync( | ||
`node ${path.join(__dirname, '../worktree/setup-worktree.js')} ${issueNumber}`, |
Check warning
Code scanning / CodeQL
Shell command built from environment values Medium
absolute path
body += '- Coordinate with dependent issues before major changes\n'; | ||
|
||
// Update issue | ||
execSync(`gh issue edit ${issueNum} --body "${body.replace(/"/g, '\\"')}"`, |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, we need to ensure that both double quotes ("
) and backslashes (\
) are escaped in the body
string before passing it to the gh issue edit
command. This can be achieved by using a regular expression with the global flag (g
) to replace all occurrences of backslashes with double backslashes and double quotes with escaped double quotes. Alternatively, a well-tested library like jsesc
can be used for escaping strings, but for simplicity, we will implement the fix using regular expressions.
-
Copy modified lines R72-R73
@@ -71,3 +71,4 @@ | ||
// Update issue | ||
execSync(`gh issue edit ${issueNum} --body "${body.replace(/"/g, '\\"')}"`, | ||
const escapedBody = body.replace(/\\/g, '\\\\').replace(/"/g, '\\"'); | ||
execSync(`gh issue edit ${issueNum} --body "${escapedBody}"`, | ||
{ stdio: 'inherit' }); |
|
||
The fixes have been committed and pushed. CI should re-run automatically.`; | ||
|
||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, we need to ensure that both double quotes ("
) and backslashes (\
) are properly escaped in the comment
string. This can be achieved by using a regular expression with the g
(global) flag to replace all occurrences of backslashes with double backslashes (\\
) and then replacing all double quotes with escaped double quotes (\"
). This ensures that the string is safe for use in the gh pr comment
command.
The fix involves modifying the comment.replace
calls on lines 286 and 304 to handle backslashes in addition to double quotes.
-
Copy modified line R286 -
Copy modified line R304
@@ -285,3 +285,3 @@ | ||
|
||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
|
||
@@ -303,3 +303,3 @@ | ||
|
||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
} |
|
||
Please review the CI logs and fix the issues manually.`; | ||
|
||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the issue, the comment.replace
operation should be updated to escape both double quotes ("
) and backslashes (\
). This can be achieved by using a regular expression with the g
flag to replace all occurrences of backslashes with double backslashes (\\
) and then escaping double quotes. This ensures that the comment
string is properly sanitized before being passed to the gh pr comment
command.
The fix involves modifying the comment.replace
calls on lines 286 and 304 to include backslash escaping. No new dependencies are required, as JavaScript's built-in replace
method with regular expressions is sufficient.
-
Copy modified line R286 -
Copy modified line R304
@@ -285,3 +285,3 @@ | ||
|
||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
|
||
@@ -303,3 +303,3 @@ | ||
|
||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
execSync(`gh pr comment ${prNumber} --body "${comment.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`, { stdio: 'inherit' }); | ||
} |
fa384b2
to
b8df171
Compare
Closing this PR as these changes are already included in v0.2.0-rc1. Thank you for the contribution! |
Summary
This PR implements avatars for the client-side grid and separates the task ID from the task name for better clarity.
Fixes #26
Changes
Visual Changes
The grid now displays:
Testing
🤖 Generated with Claude Code