Add history window controls and expand taxonomy pack support

- add 3Y/5Y/10Y financial history filtering and reorganize normalization details UI
- add new fiscal taxonomy surface/income bridge/KPI packs and update Rust taxonomy loading
- auto-detect Homebrew SQLite for native `sqlite-vec` in local dev/e2e with docs and env guidance
This commit is contained in:
2026-03-18 23:40:28 -04:00
parent f8426c4dde
commit 17de3dd72d
102 changed files with 14978 additions and 1316 deletions

View File

@@ -1,37 +1,49 @@
import { spawn } from 'node:child_process';
import { mkdirSync } from 'node:fs';
import { prepareE2eDatabase, E2E_DATABASE_PATH, E2E_WORKFLOW_DATA_DIR } from './e2e-prepare';
import { spawn } from "node:child_process";
import { mkdirSync } from "node:fs";
import {
prepareE2eDatabase,
E2E_DATABASE_PATH,
E2E_WORKFLOW_DATA_DIR,
} from "./e2e-prepare";
import { applyLocalSqliteVectorEnv } from "./sqlite-vector-env";
const host = process.env.PLAYWRIGHT_HOST ?? '127.0.0.1';
const port = process.env.PLAYWRIGHT_PORT ?? '3400';
const host = process.env.PLAYWRIGHT_HOST ?? "127.0.0.1";
const port = process.env.PLAYWRIGHT_PORT ?? "3400";
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? `http://${host}:${port}`;
const env: NodeJS.ProcessEnv = {
const initialEnv: NodeJS.ProcessEnv = {
...process.env,
BETTER_AUTH_BASE_URL: baseURL,
BETTER_AUTH_SECRET: 'playwright-e2e-secret-playwright-e2e-secret',
BETTER_AUTH_SECRET: "playwright-e2e-secret-playwright-e2e-secret",
BETTER_AUTH_TRUSTED_ORIGINS: baseURL,
DATABASE_URL: `file:${E2E_DATABASE_PATH}`,
HOSTNAME: host,
NEXT_PUBLIC_API_URL: '',
NEXT_PUBLIC_API_URL: "",
PORT: port,
SEC_USER_AGENT: 'Fiscal Clone Playwright <support@fiscal.local>',
SEC_USER_AGENT: "Fiscal Clone Playwright <support@fiscal.local>",
WORKFLOW_LOCAL_DATA_DIR: E2E_WORKFLOW_DATA_DIR,
WORKFLOW_LOCAL_QUEUE_CONCURRENCY: '1',
WORKFLOW_TARGET_WORLD: 'local'
WORKFLOW_LOCAL_QUEUE_CONCURRENCY: "1",
WORKFLOW_TARGET_WORLD: "local",
};
const { config: sqliteVectorConfig, env } =
applyLocalSqliteVectorEnv(initialEnv);
delete env.NO_COLOR;
prepareE2eDatabase();
mkdirSync(E2E_WORKFLOW_DATA_DIR, { recursive: true });
if (sqliteVectorConfig.mode === "native") {
console.info(
`[e2e] sqlite-vec native extension enabled (${sqliteVectorConfig.sqliteLibPath})`,
);
}
const child = spawn(
'bun',
['--bun', 'next', 'dev', '--turbopack', '--hostname', host, '--port', port],
"bun",
["--bun", "next", "dev", "--turbopack", "--hostname", host, "--port", port],
{
stdio: 'inherit',
env
}
stdio: "inherit",
env,
},
);
function forwardSignal(signal: NodeJS.Signals) {
@@ -40,12 +52,12 @@ function forwardSignal(signal: NodeJS.Signals) {
}
}
process.on('SIGINT', () => forwardSignal('SIGINT'));
process.on('SIGTERM', () => forwardSignal('SIGTERM'));
process.on("SIGINT", () => forwardSignal("SIGINT"));
process.on("SIGTERM", () => forwardSignal("SIGTERM"));
child.on('exit', (code, signal) => {
child.on("exit", (code, signal) => {
if (signal) {
process.exit(signal === 'SIGINT' || signal === 'SIGTERM' ? 0 : 1);
process.exit(signal === "SIGINT" || signal === "SIGTERM" ? 0 : 1);
return;
}