feat(FN-2471): persist source issue provenance in task storage

- Add TaskSourceIssue contract and thread sourceIssue through Task, TaskCreateInput, archived task entries, and TaskStore serialization paths.
- Extend SQLite schema to v45 with sourceIssue* columns and add migration coverage for v44 upgrades plus legacy JSON migration import.
- Persist, update, clear, and archive/unarchive sourceIssue metadata in TaskStore with dedicated regression tests.
- Update core and dashboard tests to schema v45 expectations and stabilize flaky modal assertions with async waits.
This commit is contained in:
Fusion
2026-04-24 12:14:56 -07:00
committed by gsxdsm
parent 0625f4a64a
commit 62cb15a4b8
15 changed files with 269 additions and 34 deletions

View File

@@ -3678,9 +3678,11 @@ describe("ModelOnboardingModal progressive disclosure", () => {
expect(screen.getByText("Create Your First Task")).toBeTruthy();
});
const aiProviderItem = getReadinessItem("AI Provider");
expect(aiProviderItem).toHaveAttribute("data-status", "skipped");
expect(aiProviderItem).toHaveTextContent(/AI agents won't be available/i);
await waitFor(() => {
const aiProviderItem = getReadinessItem("AI Provider");
expect(aiProviderItem).toHaveAttribute("data-status", "skipped");
expect(aiProviderItem).toHaveTextContent(/AI agents won't be available/i);
});
});
it("shows GitHub as missing when available but not connected", async () => {

View File

@@ -3078,7 +3078,7 @@ describe("SettingsModal", () => {
render(<SettingsModal onClose={onClose} addToast={addToast} />);
await waitFor(() => expect(fetchSettings).toHaveBeenCalled());
fireEvent.click(screen.getByText("Scheduling"));
fireEvent.click(await screen.findByText("Scheduling"));
const checkbox = screen.getByLabelText("Enable automatic task archiving");
expect(checkbox).toBeTruthy();
expect(checkbox.getAttribute("type")).toBe("checkbox");