diff --git a/AGENTS.md b/AGENTS.md index 91c4a85..76955ce 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -61,7 +61,9 @@ LOCAL_DEV_MODE="true" rm deno-x86_64-unknown-linux-gnu.zip ``` -Ensure the `deno` executable is available in your system's PATH. The above instructions place it in `/usr/local/bin/`, which is typically included in the PATH. +Ensure the `deno` executable is available in your system's PATH. The above +instructions place it in `/usr/local/bin/`, which is typically included in the +PATH. 2. Clone repository and navigate to project directory 3. Set up environment variables (copy `.env.example` to `.env`) @@ -81,7 +83,9 @@ Ensure the `deno` executable is available in your system's PATH. The above instr 2. Run `deno task check` to validate code quality 3. Test with `deno task test` and `deno task e2e` 4. Deno KV handles data persistence automatically -5. **File-Level Validation**: When coding, ensure compliance by running the following commands on the specific file being modified (replace `routes/index.tsx` with your file path): +5. **File-Level Validation**: When coding, ensure compliance by running the + following commands on the specific file being modified (replace + `routes/index.tsx` with your file path): ```bash deno check routes/index.tsx deno fmt routes/index.tsx @@ -154,4 +158,3 @@ Ensure the `deno` executable is available in your system's PATH. The above instr - Follow OWASP security guidelines - Use local authentication to avoid external dependencies - Regular security audits and dependency updates - diff --git a/TODO.md b/TODO.md index 37b41a6..fd9213a 100644 --- a/TODO.md +++ b/TODO.md @@ -3,11 +3,14 @@ ## TypeScript Errors Found (34 total) ### Primary Issue: Missing Playwright Dependency -Multiple files have `TS2307: Import "@playwright/test" not a dependency and not in import map` + +Multiple files have +`TS2307: Import "@playwright/test" not a dependency and not in import map` **Affected Files:** + - tests/e2e/document-api.spec.ts:1:36 -- tests/e2e/documents.spec.ts:1:36 +- tests/e2e/documents.spec.ts:1:36 - tests/e2e/financial-api.spec.ts:1:36 - tests/e2e/financial-ui.spec.ts:1:36 - tests/e2e/guest-home.spec.ts:1:36 @@ -22,19 +25,23 @@ Multiple files have `TS2307: Import "@playwright/test" not a dependency and not - tests/e2e/tenant-dashboard.spec.ts:1:36 ### Secondary Issue: Implicit Any Types + `TS7031: Binding element` errors for untyped parameters: **Files with untyped `page` parameter:** + - tests/e2e/documents.spec.ts (lines 4:61, 29:63) - tests/e2e/financial-ui.spec.ts (lines 4:60, 19:71) - tests/e2e/guest-home.spec.ts (lines 4:26, 8:62, 24:58) - tests/e2e/tenant-dashboard.spec.ts (lines 4:68, 18:67, 31:58, 50:68, 70:62) **Files with untyped `request` parameter:** + - tests/e2e/document-api.spec.ts (lines 4:75, 70:78) - tests/e2e/financial-api.spec.ts (lines 4:68, 19:59, 40:65, 76:66) **Files with other untyped parameters:** + - tests/e2e/helpers.ts:7:8 - `({ now })` parameter - tests/e2e/helpers.ts:82:31 - `({ id })` parameter @@ -51,12 +58,12 @@ Multiple files have `TS2307: Import "@playwright/test" not a dependency and not 3. **Example fix pattern:** ```typescript - import { Page, Request, TestInfo } from '@playwright/test'; - + import { Page, Request, TestInfo } from "@playwright/test"; + test("example test", async ({ page }: { page: Page }) => { // test code }); - + test("api test", async ({ request }: { request: Request }) => { // test code }); @@ -65,4 +72,4 @@ Multiple files have `TS2307: Import "@playwright/test" not a dependency and not 4. **Run deno check again after fixes to verify all errors resolved:** ```bash deno check 2>&1 | head -c 5000 - ``` \ No newline at end of file + ``` diff --git a/deno.json b/deno.json index dbec6cb..ea4c61c 100755 --- a/deno.json +++ b/deno.json @@ -45,7 +45,7 @@ "gcs": "https://deno.land/x/google_cloud_storage/mod.ts", "google-cloud-storage": "npm:@google-cloud/storage", "gLog": "npm:google-logging-utils", - "cosmos": "npm:@azure/cosmos" + "cosmos": "npm:@azure/cosmos", "@playwright/test": "npm:@playwright/test" }, "compilerOptions": { diff --git a/routes/tenant/settings/index.tsx b/routes/tenant/settings/index.tsx index f0cd4a3..1b400d3 100644 --- a/routes/tenant/settings/index.tsx +++ b/routes/tenant/settings/index.tsx @@ -61,46 +61,45 @@ export default define.page(function TenantSettingsPage({ }: { data: SettingsPageData; }) { - const { user, error } = data as SettingsPageData; - - if (error) { - return ( -
- Manage your notification and payment preferences. -
-+ Manage your notification and payment preferences. +
+