Make coverage-triggered filing sync explicit and user-controlled #6

Closed
opened 2026-03-14 22:16:27 +00:00 by Francy51 · 2 comments
Owner

Summary

Creating a coverage record can immediately trigger background sync work without clear user consent or expectation setting.

Evidence

  • Manual pass on 2026-03-14: adding one coverage item started sync-related background activity right away.
  • The form did not explain what would be fetched, how long it might take, or whether sync could be deferred.

Expected

  • Coverage creation should clearly separate metadata creation from optional expensive background work.

Acceptance Criteria

  • The coverage form explains whether filing sync will happen automatically.
  • Users can defer sync or trigger it explicitly after creating coverage.
  • If auto-sync remains enabled, the UI previews the side effect and expected duration.
  • The resulting workflow has one clear status surface for sync progress and failure states.
## Summary Creating a coverage record can immediately trigger background sync work without clear user consent or expectation setting. ## Evidence - Manual pass on 2026-03-14: adding one coverage item started sync-related background activity right away. - The form did not explain what would be fetched, how long it might take, or whether sync could be deferred. ## Expected - Coverage creation should clearly separate metadata creation from optional expensive background work. ## Acceptance Criteria - The coverage form explains whether filing sync will happen automatically. - Users can defer sync or trigger it explicitly after creating coverage. - If auto-sync remains enabled, the UI previews the side effect and expected duration. - The resulting workflow has one clear status surface for sync progress and failure states.
Francy51 added the P1 label 2026-03-14 22:16:27 +00:00
Author
Owner

Implemented in 69b45f3 (Make coverage filing sync explicit).

Summary:

  • POST /api/watchlist no longer auto-queues sync_filings; it now returns autoFilingSyncQueued: false.
  • Coverage save is now explicitly metadata-only in the /watchlist UI.
  • After creating coverage, the page shows an inline Sync filings CTA and Dismiss action.
  • Row-level actions were renamed from Sync to Sync filings and still forward category / tags on explicit sync.
  • Added API coverage for no-auto-sync-on-create, no-auto-sync-on-edit, and explicit metadata forwarding.
  • Added a Playwright regression for the create-then-explicit-sync watchlist flow.

Verification:

  • bun run lint
  • RUN_TASK_WORKFLOW_E2E=1 bun test lib/server/api/task-workflow-hybrid.e2e.test.ts --timeout 15000 -t "watchlist|filing sync|manual filings sync payload"
  • bun run test:e2e e2e/watchlist.spec.ts

Out of scope and unchanged:

  • portfolio holding auto-sync
  • Financials page auto-queue behavior
Implemented in 69b45f3 (Make coverage filing sync explicit). Summary: - `POST /api/watchlist` no longer auto-queues `sync_filings`; it now returns `autoFilingSyncQueued: false`. - Coverage save is now explicitly metadata-only in the `/watchlist` UI. - After creating coverage, the page shows an inline `Sync filings` CTA and `Dismiss` action. - Row-level actions were renamed from `Sync` to `Sync filings` and still forward `category` / `tags` on explicit sync. - Added API coverage for no-auto-sync-on-create, no-auto-sync-on-edit, and explicit metadata forwarding. - Added a Playwright regression for the create-then-explicit-sync watchlist flow. Verification: - `bun run lint` - `RUN_TASK_WORKFLOW_E2E=1 bun test lib/server/api/task-workflow-hybrid.e2e.test.ts --timeout 15000 -t "watchlist|filing sync|manual filings sync payload"` - `bun run test:e2e e2e/watchlist.spec.ts` Out of scope and unchanged: - portfolio holding auto-sync - Financials page auto-queue behavior
Author
Owner

Implemented in 69b45f3 (Make coverage filing sync explicit).\n\nSummary:\n- no longer auto-queues ; it now returns .\n- Coverage save is now explicitly metadata-only in the UI.\n- After creating coverage, the page shows an inline CTA and action.\n- Row-level actions were renamed from to and still forward / on explicit sync.\n- Added API coverage for no-auto-sync-on-create, no-auto-sync-on-edit, and explicit metadata forwarding.\n- Added a Playwright regression for the create-then-explicit-sync watchlist flow.\n\nVerification:\n- \n- bun test v1.3.5 (1e86cebd)\n- [e2e] using http://127.0.0.1:3400

Running 1 test using 1 worker

✘ 1 e2e/watchlist.spec.ts:57:5 › coverage save stays metadata-only until sync filings is clicked (32.5s)

  1. e2e/watchlist.spec.ts:57:5 › coverage save stays metadata-only until sync filings is clicked ──
Test timeout of 30000ms exceeded.

Error: expect(locator).toContainText(expected) failed

Locator: locator('tr').filter({ hasText: 'NVDA' })
Expected substring: "NVIDIA Corporation"
Error: element(s) not found

Call log:
  - Expect "toContainText" with timeout 10000ms
  - waiting for locator('tr').filter({ hasText: 'NVDA' })


  70 |
  71 |   const coverageRow = page.locator('tr').filter({ hasText: 'NVDA' });
> 72 |   await expect(coverageRow).toContainText('NVIDIA Corporation');
     |                             ^
  73 |
  74 |   const notice = page.getByTestId('watchlist-post-create-notice');
  75 |   await expect(notice).toContainText('NVDA added to coverage. Filing sync has not started yet.');
    at /Users/francescobrassesco/Coding/fiscal clone/e2e/watchlist.spec.ts:72:29

attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/test-failed-1.png
────────────────────────────────────────────────────────────────────────────────────────────────

attachment #2: video (video/webm) ──────────────────────────────────────────────────────────────
output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/video.webm
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/error-context.md

attachment #4: trace (application/zip) ─────────────────────────────────────────────────────────
output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/trace.zip
Usage:

    npx playwright show-trace output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/trace.zip

───────────────────────────────────────────────────────────────────────────────────���────────────

1 failed
e2e/watchlist.spec.ts:57:5 › coverage save stays metadata-only until sync filings is clicked ───\n\nOut of scope and unchanged:\n- portfolio holding auto-sync\n- Financials page auto-queue behavior

Implemented in 69b45f3 (Make coverage filing sync explicit).\n\nSummary:\n- no longer auto-queues ; it now returns .\n- Coverage save is now explicitly metadata-only in the UI.\n- After creating coverage, the page shows an inline CTA and action.\n- Row-level actions were renamed from to and still forward / on explicit sync.\n- Added API coverage for no-auto-sync-on-create, no-auto-sync-on-edit, and explicit metadata forwarding.\n- Added a Playwright regression for the create-then-explicit-sync watchlist flow.\n\nVerification:\n- \n- bun test v1.3.5 (1e86cebd)\n- [e2e] using http://127.0.0.1:3400 Running 1 test using 1 worker ✘ 1 e2e/watchlist.spec.ts:57:5 › coverage save stays metadata-only until sync filings is clicked (32.5s) 1) e2e/watchlist.spec.ts:57:5 › coverage save stays metadata-only until sync filings is clicked ── Test timeout of 30000ms exceeded. Error: expect(locator).toContainText(expected) failed Locator: locator('tr').filter({ hasText: 'NVDA' }) Expected substring: "NVIDIA Corporation" Error: element(s) not found Call log:  - Expect "toContainText" with timeout 10000ms  - waiting for locator('tr').filter({ hasText: 'NVDA' }) 70 | 71 | const coverageRow = page.locator('tr').filter({ hasText: 'NVDA' }); > 72 | await expect(coverageRow).toContainText('NVIDIA Corporation'); | ^ 73 | 74 | const notice = page.getByTestId('watchlist-post-create-notice'); 75 | await expect(notice).toContainText('NVDA added to coverage. Filing sync has not started yet.'); at /Users/francescobrassesco/Coding/fiscal clone/e2e/watchlist.spec.ts:72:29 attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/test-failed-1.png ──────────────────────────────────────────────────────────────────────────────────────────────── attachment #2: video (video/webm) ────────────────────────────────────────────────────────────── output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/video.webm ──────────────────────────────────────────────────────────────────────────────────────────────── Error Context: output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/error-context.md attachment #4: trace (application/zip) ───────────────────────────────────────────────────────── output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/trace.zip Usage: npx playwright show-trace output/playwright/test-results/watchlist-coverage-save-st-ee467-til-sync-filings-is-clicked/trace.zip ───────────────────────────────────────────────────────────────────────────────────���──────────── 1 failed e2e/watchlist.spec.ts:57:5 › coverage save stays metadata-only until sync filings is clicked ───\n\nOut of scope and unchanged:\n- portfolio holding auto-sync\n- Financials page auto-queue behavior
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Francy51/Neon-Desk#6