Skip to content

Develop#56

Merged
Benevanio merged 3 commits into
masterfrom
develop
Apr 4, 2026
Merged

Develop#56
Benevanio merged 3 commits into
masterfrom
develop

Conversation

@Benevanio

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 4, 2026 19:52
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
painel-vagas Ready Ready Preview, Comment Apr 4, 2026 7:58pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the frontend filtering UX to support selecting multiple keywords at once, refreshes UI styling/icons, and extends the jobs table to display keyword tags plus new “Spam”/“Lido” toggle columns.

Changes:

  • Switch keywordFilter from a single "all"|string value to a string[] (multi-select), with corresponding test updates.
  • Revamp JobsFiltersCard UI (selected filter “chips”, manage/clear actions) and update modal copy (“Gerenciar filtros”).
  • Enhance JobsTableCard to split palavra into multiple visible tags and add per-row spam/read toggle state; add react-icons dependency.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package-lock.json Adds react-icons to the lockfile.
frontend/package.json Adds react-icons dependency for new icons used in UI.
frontend/src/hooks/useJobsFiltering.ts Changes keyword filtering state to string[] and updates filter logic.
frontend/src/components/JobsFiltersCard.tsx New filter UI layout, selected filter chips, manage/clear controls; keywordFilter prop now string[].
frontend/src/components/JobsTableCard.tsx Displays split keyword tags, adds Spam/Lido columns with toggle buttons, and updates table layout.
frontend/src/components/KeywordsModal.tsx Copy/label updates to align “keywords” with “filtros”.
frontend/src/App.tsx Adapts to keywordFilter: string[], adds scraping button styling/icon updates.
frontend/tests/unit/utils/useJobsFiltering.test.ts Adds test for multi-keyword selection behavior.
frontend/tests/unit/pages/App.test.tsx Updates mocks for new useJobsData/useJobsFiltering shape.
frontend/tests/unit/components/JobsTableCard.test.tsx Adds coverage for keyword tag rendering and spam/read toggle behavior.
frontend/tests/unit/components/JobsFiltersCard.test.tsx Updates keywordFilter prop type and adds coverage for manage/clear filter UX.
backend/src/db/environment.json Updates default KEYWORDS seed list.

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

Comment on lines 16 to 19
return jobs.filter((job) => {
const byKeyword = keywordFilter === "all" || String(job.palavra || "") === keywordFilter;
const currentKeyword = String(job.palavra || "").trim();
const byKeyword = keywordFilter.length === 0 || keywordFilter.includes(currentKeyword);
if (!byKeyword) {

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

byKeyword compara o filtro com job.palavra inteiro. Como a UI agora exibe/aceita múltiplas palavras-chave (e o próprio JobsTableCard quebra palavra por vírgula/;|), um job com palavra como "JavaScript, UX-UI" nunca vai casar com um filtro "JavaScript". Sugestão: normalizar job.palavra em uma lista (mesma regra de split/trim do table) e considerar match por interseção; e também gerar keywords a partir dos tokens (não do campo bruto).

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +28
function getSelectedFilters(search: string, keywordFilter: string[]) {
const searchTerms = search
.split(/[,;/]+/)
.map((item) => item.trim())
.filter(Boolean)
.slice(0, 5);

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

O split de termos de busca em getSelectedFilters (e também em handleRemoveFilter) inclui "/" como delimitador. Isso quebra termos comuns com barra (ex.: "UX/UI", "C/C++"), gerando filtros/chips inesperados e removendo partes do texto ao clicar em remover. Considere limitar os delimitadores a vírgula/;| (ou outro separador explícito) e tratar "/" como caractere normal.

Suggested change
function getSelectedFilters(search: string, keywordFilter: string[]) {
const searchTerms = search
.split(/[,;/]+/)
.map((item) => item.trim())
.filter(Boolean)
.slice(0, 5);
function splitSearchTerms(search: string) {
return search
.split(/[;,|]+/)
.map((item) => item.trim())
.filter(Boolean);
}
function getSelectedFilters(search: string, keywordFilter: string[]) {
const searchTerms = splitSearchTerms(search).slice(0, 5);

Copilot uses AI. Check for mistakes.
<TableHead>Local</TableHead>
<TableHead>Link</TableHead>
<TableHead>Palavra-chave</TableHead>
<TableHead>Palavras chaves</TableHead>

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

O header "Palavras chaves" está com grafia inconsistente em PT-BR. Sugestão: usar "Palavras-chave" (com hífen) para manter a ortografia correta e consistente com o restante da UI (ex.: "palavras-chave" já aparece em outros textos).

Suggested change
<TableHead>Palavras chaves</TableHead>
<TableHead>Palavras-chave</TableHead>

Copilot uses AI. Check for mistakes.
Comment on lines +178 to +184
<div className="flex flex-wrap gap-1 text-sm text-foreground/85">
{keywords.map((keyword, keywordIndex) => (
<div key={`${jobId}-${keyword}`} className="flex items-center">
<span>{keyword}</span>
{keywordIndex < keywords.length - 1 ? <span aria-hidden="true">,&nbsp;</span> : null}
</div>
))}

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

A key do map de keywords usa apenas ${jobId}-${keyword}. Se job.palavra vier com keywords repetidas (ou normalização futura gerar duplicatas), isso causa keys duplicadas e warnings do React. Sugestão: incluir keywordIndex na key (ou deduplicar keywords antes do map).

Copilot uses AI. Check for mistakes.
@Benevanio
Benevanio merged commit 89c1cd5 into master Apr 4, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in JobAtlas – Kanban Apr 4, 2026
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