fix(crm): scroll na ficha do contato, filtro no Kanban e período pers…#62
Conversation
…onalizado em Conversas Corrige o clipping silencioso da ficha de informações do contato: o item de grid (crm-thread-pane) não tinha min-height:0, então o CSS Grid deixava o conteúdo crescer além do container e o overflow:hidden do grid cortava tudo sem nunca mostrar scrollbar — reproduzido e validado com Chrome headless antes de corrigir. Ajusta o texto do campo personalizado vazio. Adiciona ao Kanban o mesmo painel de filtro (etiqueta + período) que já existia em Conversas, e em ambas as telas acrescenta um período "Personalizado…" com seleção de data(s) pelo usuário. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughCRM conversation and Kanban views now support personalized date filtering and combined Kanban filters. The CRM page passes etiqueta data into Kanban, conversation panes constrain layout height, and the custom-fields empty-state text is updated. ChangesCRM filtering and presentation
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant Kanban
participant crm-periodos
participant Leads
User->>Kanban: Set search, etiqueta, or period filters
Kanban->>crm-periodos: Calculate selected date range
Kanban->>Leads: Apply leadPassaFiltro
Leads-->>Kanban: Render matching leads
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/crm/Kanban.tsx`:
- Around line 1043-1051: Update the React style annotation for
rotuloEstiloKanban to use the CSSProperties type imported from "react". Add a
type-only CSSProperties import and replace React.CSSProperties with
CSSProperties, leaving the style values unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ac7ab5a-7c3c-4a63-92c4-c07289560783
📒 Files selected for processing (5)
app/dashboard/crm/page.tsxcomponents/crm/ConversasFiltravel.tsxcomponents/crm/InformacoesContato.tsxcomponents/crm/Kanban.tsxlib/crm-periodos.ts
|
|
||
| const rotuloEstiloKanban: React.CSSProperties = { | ||
| fontSize: 9, | ||
| letterSpacing: "1.5px", | ||
| textTransform: "uppercase", | ||
| color: "var(--text-4)", | ||
| fontWeight: 600, | ||
| marginBottom: 6, | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "--- Kanban.tsx import lines ---"
rg -n '^import' components/crm/Kanban.tsx
echo "--- Any other React.* usage in Kanban.tsx ---"
rg -n 'React\.' components/crm/Kanban.tsx
echo "--- allowUmdGlobalAccess / jsx setting ---"
fd -H -e json tsconfig.json --exec cat {}Repository: sejaanomalo-web/metas-anomalo
Length of output: 1550
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "--- current file around the style declaration ---"
sed -n '1036,1048p' components/crm/Kanban.tsx
echo "--- react imports in the repo using React.CSSProperties ---"
rg -n 'React\.CSSProperties|CSSProperties' components -g '*.tsx' -g '*.ts'
echo "--- tsconfig / next config hints for JSX transform ---"
fd -H -e json tsconfig.json -e js next.config.* --exec sh -c 'echo "FILE: {}"; cat "{}"; echo'Repository: sejaanomalo-web/metas-anomalo
Length of output: 6129
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "--- sample files using React.CSSProperties: imports and top lines ---"
for f in \
components/SeletorPeriodoGlobal.tsx \
components/SeletorPeriodo.tsx \
components/crm/ConversasFiltravel.tsx \
components/crm/Kanban.tsx
do
echo "FILE: $f"
sed -n '1,20p' "$f"
echo
doneRepository: sejaanomalo-web/metas-anomalo
Length of output: 2863
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
for f in [
Path("components/SeletorPeriodoGlobal.tsx"),
Path("components/SeletorPeriodo.tsx"),
Path("components/crm/ConversasFiltravel.tsx"),
Path("components/crm/Kanban.tsx"),
]:
text = f.read_text()
print(f"{f}: React default import?", 'import React' in text or 'from "react"' in text.splitlines()[0:5])
PYRepository: sejaanomalo-web/metas-anomalo
Length of output: 413
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "--- does tsconfig enable allowUmdGlobalAccess anywhere ---"
rg -n '"allowUmdGlobalAccess"' -g 'tsconfig*.json' -g '*.json' .
echo "--- exact imports from react in Kanban.tsx ---"
sed -n '1,12p' components/crm/Kanban.tsxRepository: sejaanomalo-web/metas-anomalo
Length of output: 226
Import CSSProperties here components/crm/Kanban.tsx:1044 uses React.CSSProperties, but this file only imports hooks from "react". Replace it with import type { CSSProperties } from "react" and annotate the style as CSSProperties.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@components/crm/Kanban.tsx` around lines 1043 - 1051, Update the React style
annotation for rotuloEstiloKanban to use the CSSProperties type imported from
"react". Add a type-only CSSProperties import and replace React.CSSProperties
with CSSProperties, leaving the style values unchanged.
…onalizado em Conversas
Corrige o clipping silencioso da ficha de informações do contato: o item de grid (crm-thread-pane) não tinha min-height:0, então o CSS Grid deixava o conteúdo crescer além do container e o overflow:hidden do grid cortava tudo sem nunca mostrar scrollbar — reproduzido e validado com Chrome headless antes de corrigir. Ajusta o texto do campo personalizado vazio.
Adiciona ao Kanban o mesmo painel de filtro (etiqueta + período) que já existia em Conversas, e em ambas as telas acrescenta um período "Personalizado…" com seleção de data(s) pelo usuário.
Summary by CodeRabbit