YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(chat): keep home card grid rows balanced (no orphan last-row cell)
Anshgrover23d7f5faae1591
diff --git a/apps/screenpipe-app-tauri/components/chat/summary-cards.tsx b/apps/screenpipe-app-tauri/components/chat/summary-cards.tsxindex 0f6c5b0ad..c3c502fec 100644--- a/apps/screenpipe-app-tauri/components/chat/summary-cards.tsx+++ b/apps/screenpipe-app-tauri/components/chat/summary-cards.tsx@@ -172,8 +172,21 @@ export function SummaryCards({onSendMessage(template.prompt, `\u{1F4CC} ${template.title}`);};+ // Keep the 3-column grid rows full: only show as many per-app setup suggestions+ // as leave no orphan cells in the last row. Setup suggestions are for *unconnected*+ // apps, so a typical user has plenty (>= a full row); the trim only kicks in for+ // someone who has connected almost everything, where a tidy 2-row grid reads fine.+ const GRID_COLUMNS = 3;+ const alwaysOnCardCount =+ featured.length + 1 /* custom summary */ + (discover.length > 0 ? 1 : 0) + 1 /* browse all */;+ const setupRowRemainder =+ (alwaysOnCardCount + connectionSetupSuggestions.length) % GRID_COLUMNS;+ const rowFilledConnectionSuggestions = connectionSetupSuggestions.slice(+ 0,+ Math.max(0, connectionSetupSuggestions.length - setupRowRemainder),+ );const visibleConnectionSetupSuggestions = [- ...connectionSetupSuggestions,+ ...rowFilledConnectionSuggestions,{ id: "connections", title: "Connect Apps", description: "Browse all connections", icon: "connections" },];diff --git a/apps/screenpipe-app-tauri/lib/chat/__tests__/connection-suggestions.test.ts b/apps/screenpipe-app-tauri/lib/chat/__tests__/connection-suggestions.test.tsindex 5a9b2fb97..ab045fded 100644--- a/apps/screenpipe-app-tauri/lib/chat/__tests__/connection-suggestions.test.ts+++ b/apps/screenpipe-app-tauri/lib/chat/__tests__/connection-suggestions.test.ts@@ -101,6 +101,12 @@ describe("connection suggestions", () => {description: "Search your docs",icon: "notion",},+ {+ id: "google-docs",+ title: "Connect Google Docs",+ description: "Search your docs",+ icon: "google-docs",+ },]);});});diff --git a/apps/screenpipe-app-tauri/lib/chat/connection-suggestions.ts b/apps/screenpipe-app-tauri/lib/chat/connection-suggestions.tsindex 70003bb2d..883cdce74 100644--- a/apps/screenpipe-app-tauri/lib/chat/connection-suggestions.ts+++ b/apps/screenpipe-app-tauri/lib/chat/connection-suggestions.ts@@ -355,6 +355,6 @@ export function buildConnectionSetupSuggestions(a.fallbackRank - b.fallbackRank ||a.suggestion.title.localeCompare(b.suggestion.title))- .slice(0, 2)+ .slice(0, 3).map((entry) => entry.suggestion);}