Skip to content

Conversation

@google-labs-jules
Copy link

This change addresses multiple security, performance, and accessibility issues identified during a project audit.

Key improvements:

  • Security: Removed @sysvale/vue3-long-click which was pulling in Vue 2 into a Vue 3 project, causing stability issues and introducing ReDoS vulnerabilities. Implemented a local longClickDirective to replace it. Resolved several other vulnerabilities via npm audit fix.
  • Performance: Fixed a bug in Table.vue where multiple elements were assigned the same ID, which caused slow and unreliable DOM queries. Optimized LineChart.vue bundle size by selectively registering Chart.js components.
  • Accessibility:
    • Clickable.vue now uses proper ARIA roles, tabindex, and supports keyboard interaction (Enter/Space).
    • Checkbox.vue now uses a focusable native input, making it accessible to keyboard and screen reader users.
    • Button.vue now applies the native disabled attribute.
    • Label.vue correctly applies the for attribute to link with inputs.
  • Documentation: Created VULNERABILITIES.md to track identified issues and recommended further improvements.
  • Tests: Added/updated tests for Clickable, Checkbox, and Button to ensure ongoing stability and accessibility.

PR created automatically by Jules for task 7680327977151558057 started by @lucasn4s

- Performed comprehensive audit and documented findings in VULNERABILITIES.md.
- Replaced @sysvale/vue3-long-click with local implementation to resolve mixed Vue versions and ReDoS vulnerability.
- Improved accessibility in Clickable.vue, Checkbox.vue, Button.vue, and Label.vue.
- Optimized Table.vue by resolving non-unique ID issues.
- Optimized LineChart.vue by using tree-shakable Chart.js registration.
- Resolved multiple dependency vulnerabilities via npm audit fix.
- Added unit tests for Clickable, Checkbox, and Button.
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions bot added the 🐛 Bug Algo não está funcionando label Jan 16, 2026
@lucasn4s
Copy link
Collaborator

Os testes automatizados do CI estão falhando.

@google-labs-jules
Copy link
Author

Os testes automatizados do CI estão falhando.

Identifiquei que alguns snapshots de teste precisavam ser atualizados devido às melhorias de acessibilidade (como a adição do atributo 'for' em labels e 'role' em elementos clicáveis). Atualizei todos os snapshots e confirmei que todos os 202 testes estão passando agora.

Updated snapshots for BaseInput, CheckboxGroup, DateInput, MultiFileInput, NumberInput, RadioButtonGroup, Select, Table, TextInput, Textarea, and Tile to reflect intentional accessibility and semantic HTML improvements.
@lucasn4s
Copy link
Collaborator

Um teste ainda está falhando, pois o snapshot renderiza um ID de componente para o novo atributo for do componente label. Por este ID ser gerado novamente a cada execução do pipeline, o teste de snapshot vai falhar sempre, no cenário atual.

@google-labs-jules
Copy link
Author

Um teste ainda está falhando, pois o snapshot renderiza um ID de componente para o novo atributo for do componente label. Por este ID ser gerado novamente a cada execução do pipeline, o teste de snapshot vai falhar sempre, no cenário atual.

Você tem razão. Para resolver isso, criei um arquivo de configuração de testes (src/tests/setup.js) que faz o mock das funções de geração de ID (uuidv4 e generateKey) para retornarem um valor fixo durante os testes. Atualizei os snapshots com esses valores estáveis, o que deve garantir que o CI passe consistentemente.

- Created src/tests/setup.js to mock uuidv4 and generateKey functions.
- Configured vitest to use the setup file.
- Updated all snapshots to use stable IDs.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Para manter o padrão do projeto, creio que esse arquivo deveria ser em português, ou pelo menos ter uma versão em português.

Copy link
Author

Choose a reason for hiding this comment

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

Perfeito, traduzi o arquivo VULNERABILITIES.md para o português para manter a consistência com o restante do projeto.

Translated VULNERABILITIES.md content to Portuguese to match the project's standard language.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug Algo não está funcionando

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants