feat: UI improvements — analytics metrics, discard changes, SSO hints#66
feat: UI improvements — analytics metrics, discard changes, SSO hints#66TerrifiedBug merged 32 commits intomainfrom
Conversation
- Fleet: collapse node labels into a compact count button with popover - Fleet: replace native confirm() with styled ConfirmDialog for maintenance mode - Dashboard: add drag, resize, and reorder support for custom view panels using react-grid-layout - Pipelines: center the SLI health dot in the Health column - Profile: display user role and super admin status in personal info
…types stub - Add queryClient.invalidateQueries for dashboard.listViews on updateView mutation success so remounting loads the persisted layout - Remove @types/react-grid-layout (deprecated stub, v2 ships own types)
- Use a ref (filtersRef) to hold latest filter values so the debounce timer reads current pipelineIds/nodeIds when it fires, not the values captured at scheduling time - Clear pending debounce timer on component unmount to prevent stale mutations after navigation
- Move filtersRef.current assignment into a useEffect to satisfy react-hooks/refs lint rule (no ref writes during render) - Wrap panels cast in useMemo to stabilize the dependency for downstream useMemo hooks
Replace the standalone "Service Accounts & API Keys" button above the settings tabs with an inline "API Keys" tab visible to team admins. Extract ServiceAccountsSettings as a named export so it can be rendered both as a tab and as the existing standalone page route.
Temporary debug logs at each decision point in the reconciliation chain: - auth.ts: log final group list and scimEnabled flag - group-mappings.ts: log loaded mappings, desired state, existing members
Replace raw console.log debug statements with a shared debugLog() helper that only outputs when VF_LOG_LEVEL or LOG_LEVEL is set to debug or trace. Applies to OIDC group sync, SCIM reconciliation, agent enrollment, and system Vector process logs. Operational and error logs remain unchanged.
Greptile SummaryThis PR delivers three feature areas: a refactored analytics KPI section (replacing the misleading byte-based "Reduction" card with separate "Events Reduced" and "Bytes Saved" cards), a "Discard unsaved changes" workflow that restores a deployed pipeline to its last deployed snapshot, and an SSO hint in the Add Member dialog. The discard path is well-implemented — Key issues found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant FE as Pipeline Editor
participant QC as React Query Cache
participant API as tRPC / Server
participant DB as PostgreSQL
Note over U,DB: Deploy path (stores snapshot)
U->>FE: Click Deploy
FE->>API: deploy.agent(pipelineId)
API->>DB: createVersion(yaml, nodesSnapshot, edgesSnapshot)
DB-->>API: PipelineVersion (with snapshot)
API-->>FE: { versionId, versionNumber }
Note over U,DB: Discard Changes path (fixed in this PR)
U->>FE: Click Discard
FE->>API: pipeline.discardChanges(pipelineId)
API->>DB: $transaction: restore nodes/edges from snapshot
DB-->>API: OK
API-->>FE: { discarded: true }
FE->>FE: markClean()
FE->>QC: invalidate pipeline.get
QC->>API: pipeline.get(pipelineId)
API-->>QC: restored nodes/edges
QC-->>FE: loadGraph() (isDirty=false → guard bypassed)
Note over U,DB: Rollback path (bug: missing invalidation)
U->>FE: Open Version History → Rollback to vN
FE->>API: pipeline.rollback(pipelineId, versionId)
API->>DB: $transaction: restore nodes/edges from snapshot
DB-->>API: OK (transaction committed)
API->>DB: createVersion(...) ← OUTSIDE transaction
DB-->>API: new PipelineVersion
API-->>FE: newVersion
FE->>QC: invalidate pipeline.versions only
Note over FE,QC: pipeline.get NOT invalidated<br/>markClean() NOT called<br/>Canvas shows stale pre-rollback state
|
…ogging Skip member removal in Groups PUT when incoming member list is empty but current members exist — prevents pocket-id's intermediate sync states from wiping team memberships. Add debugLog calls across all SCIM User and Group endpoints gated behind VF_LOG_LEVEL=debug.
Without this, the isDirty guard in the loadGraph useEffect prevents the editor from reloading the restored state after discard.
|
@greptile review |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Summary
PipelineVersionon deploy. NewdiscardChangesmutation restores pipeline to last deployed state. Discard button in toolbar with confirmation dialog. BothdeployAgentandcreateVersionpaths store snapshots. Rollback also restores nodes/edges and is now transactional.Test plan