Skip to content

demo: replace social feed with spreadsheet app, update overlay and docs#94

Open
aidenybai wants to merge 1 commit intomainfrom
aiden/demo-spreadsheet-redesign
Open

demo: replace social feed with spreadsheet app, update overlay and docs#94
aidenybai wants to merge 1 commit intomainfrom
aiden/demo-spreadsheet-redesign

Conversation

@aidenybai
Copy link
Copy Markdown
Member

@aidenybai aidenybai commented Apr 8, 2026

Summary

  • Replace social feed demo with a spreadsheet grid demo app (new spreadsheet-grid.tsx and dashboard.tsx, removed old social feed components/pages)
  • Update browser overlay cursor pointer styling and constants
  • Refine website demo recording scripts and constants
  • Update CLI README, SKILL.md docs, browser testing rules, and agent inference logic

Test plan

  • Verify demo app loads with spreadsheet grid
  • Check browser overlay cursor renders correctly
  • Confirm website demo recording still works

Note

Medium Risk
Medium risk due to a full demo app swap (new state model, keyboard/mouse interactions, formula evaluation) plus changes to the injected overlay behavior and website demo recorder, which could introduce UI regressions or brittle scripted recordings.

Overview
Replaces the apps/demo social-feed demo (login/feed/profile/post flows) with a spreadsheet-style dashboard: new SpreadsheetGrid UI with cell selection, inline editing, range drag highlight, keyboard navigation, and basic =SUM(A1:B2) formula evaluation backed by a new cell-based store/seed data.

Updates demo presentation and tooling: new header/layout styling, refreshed theme tokens and error boundary styling, and website demo replay/recording retargeted to a localhost “InvoiceApp” scenario (new step definitions, trace status, and scripted interactions).

Tweaks the injected browser overlay visuals/behavior (larger cursor/tooltip, updated positioning/flip constants, mousemove-driven cursor updates) and updates Expect docs/rules (subagent-first testing, session reuse) along with minor cleanup in infer-agent and a local-path .mcp.json command change.

Reviewed by Cursor Bugbot for commit f8b5480. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Replaced the social feed demo with a spreadsheet app that supports selection, range drag, inline edit, and basic formulas, and refreshed the overlay/recording UX to improve demo clarity.

  • New Features

    • Added a spreadsheet grid (spreadsheet-grid.tsx, dashboard.tsx) with selection, drag-to-select, Enter/Tab navigation, Delete to clear, and formula evaluation for =SUM(A#:B#).
    • Header-based layout ("Sheets") with status-aware cell styling (Paid/Received/Pending) and a formula bar showing the selected range.
  • Refactors

    • Removed the social feed pages/components and simplified routing; rethemed styles.
    • Rebuilt store/seed/types around cell data and selection; exposed COL_COUNT, ROW_COUNT, and colLetter; added raw vs computed cell values.
    • Updated overlay: larger pointer, new colors, tooltip sizing/flip thresholds, and mouse-follow; tweaked overlay constants.
    • Retargeted website demo to http://localhost:5173, updated scripted steps/trace, and refined recorder timing.
    • Docs and rules: improved CLI README, SKILL.md, and browser testing rules with subagent and session reuse guidance.
    • Tooling: .mcp.json now launches expect via node; minor cleanup in infer-agent; small CSS/Title tweaks.

Written for commit f8b5480. Summary will update on new commits.

- Replace social feed demo with spreadsheet grid demo app
- Update browser overlay cursor pointer and constants
- Refine website demo recording scripts and constants
- Update CLI README, SKILL.md docs, and browser testing rules
- Update infer-agent provider detection
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 8, 2026

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

Project Deployment Actions Updated (UTC)
expect Error Error Apr 8, 2026 2:51pm

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/expect-cli@94

commit: f8b5480

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 5 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f8b5480. Configure here.

"args": [
"-y",
"expect-cli@latest",
"/Users/aidenybai/Developer/expect/apps/cli/dist/index.js",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hardcoded local filesystem path in MCP config

High Severity

The .mcp.json config was changed from npx -y expect-cli@latest mcp to a hardcoded absolute path /Users/aidenybai/Developer/expect/apps/cli/dist/index.js. This is a developer-specific local filesystem path that will not work for any other contributor or in CI. This appears to be a local development override that was accidentally committed.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8b5480. Configure here.

if (editingCell) {
commitEdit();
const { col, row } = parseSelected();
const nextCell = `${store.colLetter(col)}${row + 1}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Enter key doesn't clamp row within grid bounds

Medium Severity

When pressing Enter to commit an edit, the next cell is computed as row + 1 without clamping to store.ROW_COUNT. The ArrowDown handler correctly uses Math.min(row + 1, store.ROW_COUNT), but both Enter key handlers (in handleKeyDown and in the cell's inline onKeyDown) skip this bounds check. On the last row, this selects a cell outside the rendered grid.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8b5480. Configure here.


await hoverAndClick(page, copyButtons.nth(1));
await waitUntilOffset(page, scenarioStartMs, copySkillStep.endOffsetMs);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Recording script references UI elements absent from demo

Medium Severity

recordInvoiceAppScenario locates elements like "New Invoice" link and "Create Invoice" submit button, and the step definitions describe "InvoiceApp" flows. But the demo app at DEMO_TARGET_URL (localhost:5173) is now a spreadsheet grid with none of these elements. Running this recording script against the current demo will fail immediately.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8b5480. Configure here.

posts: data.posts.map((p) =>
p.id === postId
? {
...p,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused store methods and type never referenced

Low Severity

store.getSelectionRange and store.deleteRow are newly added methods that are never called anywhere in the codebase. Similarly, the SpreadsheetState interface exported from types.ts is never imported or referenced. These are dead code that add maintenance burden.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8b5480. Configure here.

},
};
});
const demoEvents: eventWithTime[] = recordedDemoEvents.map((event) => event);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Identity map produces a redundant shallow copy

Low Severity

recordedDemoEvents.map((event) => event) is a no-op identity mapping. The previous code transformed URL hostnames in the events, but that logic was removed, leaving behind a pointless .map that just copies the array without changes.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8b5480. Configure here.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 31 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/website/scripts/record-demo.ts">

<violation number="1" location="apps/website/scripts/record-demo.ts:117">
P1: This recording script references UI elements (`"New Invoice"` link, `"Create Invoice"` button, delete buttons) that don't exist in the new spreadsheet demo app. The demo at `DEMO_TARGET_URL` (localhost:5173) now renders a spreadsheet grid — running this script will fail immediately on this locator.</violation>
</file>

<file name=".mcp.json">

<violation number="1" location=".mcp.json:4">
P1: The MCP server command uses a hardcoded absolute local path, which makes this config non-portable and likely broken for every other environment.</violation>
</file>

<file name=".cursor/rules/browser-testing.mdc">

<violation number="1" location=".cursor/rules/browser-testing.mdc:61">
P2: The new session-persistence guidance conflicts with the existing "unlock when done" rule by telling users not to unlock across turns. Keep tabs open across turns, but release `browser_lock` at turn end and reacquire next turn.</violation>
</file>

<file name="apps/demo/src/components/spreadsheet-grid.tsx">

<violation number="1" location="apps/demo/src/components/spreadsheet-grid.tsx:77">
P2: Clamp Enter navigation to the last row to avoid selecting cells outside the grid.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

await page.mouse.move(500, 400, { steps: 8 });
await waitUntilOffset(page, scenarioStartMs, setupStep.endOffsetMs);

const newInvoiceButton = page.locator("a", { hasText: "New Invoice" });
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 8, 2026

Choose a reason for hiding this comment

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

P1: This recording script references UI elements ("New Invoice" link, "Create Invoice" button, delete buttons) that don't exist in the new spreadsheet demo app. The demo at DEMO_TARGET_URL (localhost:5173) now renders a spreadsheet grid — running this script will fail immediately on this locator.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/website/scripts/record-demo.ts, line 117:

<comment>This recording script references UI elements (`"New Invoice"` link, `"Create Invoice"` button, delete buttons) that don't exist in the new spreadsheet demo app. The demo at `DEMO_TARGET_URL` (localhost:5173) now renders a spreadsheet grid — running this script will fail immediately on this locator.</comment>

<file context>
@@ -102,61 +101,48 @@ const hoverAndClick = async (page: Page, locator: Locator): Promise<void> => {
+  await page.mouse.move(500, 400, { steps: 8 });
+  await waitUntilOffset(page, scenarioStartMs, setupStep.endOffsetMs);
+
+  const newInvoiceButton = page.locator("a", { hasText: "New Invoice" });
+  await hoverAndClick(page, newInvoiceButton);
+  await page.waitForTimeout(NAVIGATE_SETTLE_MS);
</file context>
Fix with Cubic

"mcpServers": {
"expect": {
"command": "npx",
"command": "node",
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 8, 2026

Choose a reason for hiding this comment

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

P1: The MCP server command uses a hardcoded absolute local path, which makes this config non-portable and likely broken for every other environment.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .mcp.json, line 4:

<comment>The MCP server command uses a hardcoded absolute local path, which makes this config non-portable and likely broken for every other environment.</comment>

<file context>
@@ -1,10 +1,9 @@
   "mcpServers": {
     "expect": {
-      "command": "npx",
+      "command": "node",
       "args": [
-        "-y",
</file context>
Fix with Cubic

Comment on lines +61 to +63
1. Do NOT call `close` or `browser_lock unlock` if you plan to revisit the page
2. On the next turn, `browser_tabs list` will show the existing tab — reuse it
3. Only close/unlock when ALL verification is complete and no more iterations are expected
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 8, 2026

Choose a reason for hiding this comment

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

P2: The new session-persistence guidance conflicts with the existing "unlock when done" rule by telling users not to unlock across turns. Keep tabs open across turns, but release browser_lock at turn end and reacquire next turn.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/rules/browser-testing.mdc, line 61:

<comment>The new session-persistence guidance conflicts with the existing "unlock when done" rule by telling users not to unlock across turns. Keep tabs open across turns, but release `browser_lock` at turn end and reacquire next turn.</comment>

<file context>
@@ -53,6 +54,14 @@ Reference the performance skill at `.agents/skills/performance/SKILL.md` and the
+
+When you expect to re-verify after code fixes, keep the browser session alive between turns:
+
+1. Do NOT call `close` or `browser_lock unlock` if you plan to revisit the page
+2. On the next turn, `browser_tabs list` will show the existing tab — reuse it
+3. Only close/unlock when ALL verification is complete and no more iterations are expected
</file context>
Suggested change
1. Do NOT call `close` or `browser_lock unlock` if you plan to revisit the page
2. On the next turn, `browser_tabs list` will show the existing tab — reuse it
3. Only close/unlock when ALL verification is complete and no more iterations are expected
1. Do NOT call `close` if you plan to revisit the page
2. On the next turn, `browser_tabs list` will show the existing tab — reuse it
3. Still call `browser_lock` with action `unlock` at the end of each turn, then re-lock the tab on the next turn
Fix with Cubic

if (editingCell) {
commitEdit();
const { col, row } = parseSelected();
const nextCell = `${store.colLetter(col)}${row + 1}`;
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 8, 2026

Choose a reason for hiding this comment

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

P2: Clamp Enter navigation to the last row to avoid selecting cells outside the grid.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/demo/src/components/spreadsheet-grid.tsx, line 77:

<comment>Clamp Enter navigation to the last row to avoid selecting cells outside the grid.</comment>

<file context>
@@ -0,0 +1,296 @@
+      if (editingCell) {
+        commitEdit();
+        const { col, row } = parseSelected();
+        const nextCell = `${store.colLetter(col)}${row + 1}`;
+        store.selectCell(nextCell);
+        onUpdate();
</file context>
Fix with Cubic

aidenybai added a commit that referenced this pull request Apr 8, 2026
Replace social feed demo with spreadsheet grid app (cell selection,
editing, formula evaluation, keyboard nav). Update browser overlay
cursor colors and add mousemove tracking. Add subagent usage and
session persistence guidance to skills and rules.
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.

1 participant