diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 5ac471f..68b05d3 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -2,7 +2,7 @@ name: CI Pipeline run-name: "${{ gitea.actor }} triggered CI pipeline" on: - workflow_dispatch: {} # Manual trigger only - run tests locally before merging + workflow_dispatch: {} # Manual trigger only - run tests locally before merging # Auto-runs disabled for solo development # Re-enable when ready for collaborators: # pull_request: diff --git a/app/components/WebVitalsDashboard/WebVitalsDashboard.container.tsx b/app/components/WebVitalsDashboard/WebVitalsDashboard.container.tsx index a5caf4e..9edf346 100644 --- a/app/components/WebVitalsDashboard/WebVitalsDashboard.container.tsx +++ b/app/components/WebVitalsDashboard/WebVitalsDashboard.container.tsx @@ -41,23 +41,24 @@ const WebVitalsDashboardContainer = memo(() => { if (typeof window !== "undefined") { import("web-vitals").then((webVitals) => { // web-vitals v4 typings don't expose legacy get* names the same way; runtime bundle still provides them for this dashboard. - const { getCLS, getFID, getFCP, getLCP, getTTFB } = webVitals as unknown as { - getCLS: ( - _fn: (_m: { value: number; rating: string }) => void, - ) => void; - getFID: ( - _fn: (_m: { value: number; rating: string }) => void, - ) => void; - getFCP: ( - _fn: (_m: { value: number; rating: string }) => void, - ) => void; - getLCP: ( - _fn: (_m: { value: number; rating: string }) => void, - ) => void; - getTTFB: ( - _fn: (_m: { value: number; rating: string }) => void, - ) => void; - }; + const { getCLS, getFID, getFCP, getLCP, getTTFB } = + webVitals as unknown as { + getCLS: ( + _fn: (_m: { value: number; rating: string }) => void, + ) => void; + getFID: ( + _fn: (_m: { value: number; rating: string }) => void, + ) => void; + getFCP: ( + _fn: (_m: { value: number; rating: string }) => void, + ) => void; + getLCP: ( + _fn: (_m: { value: number; rating: string }) => void, + ) => void; + getTTFB: ( + _fn: (_m: { value: number; rating: string }) => void, + ) => void; + }; getLCP((metric: { value: number; rating: VitalData["rating"] }) => { setVitals((prev) => ({ diff --git a/app/create/confirm-stakeholders/page.tsx b/app/create/confirm-stakeholders/page.tsx index 4251cb5..23785f6 100644 --- a/app/create/confirm-stakeholders/page.tsx +++ b/app/create/confirm-stakeholders/page.tsx @@ -13,8 +13,7 @@ const TITLE = const DESCRIPTION = "Adding people at this step will invite them to see your proposed CommunityRule and make their own proposals."; -const DRAFT_TOAST_TITLE = - "Congratulations! You've drafted your CommunityRule!"; +const DRAFT_TOAST_TITLE = "Congratulations! You've drafted your CommunityRule!"; /** * Confirm stakeholders step — stacked lockup + MultiSelect (not split columns). @@ -23,7 +22,9 @@ const DRAFT_TOAST_TITLE = export default function ConfirmStakeholdersPage() { const [isMounted, setIsMounted] = useState(false); const [toastDismissed, setToastDismissed] = useState(false); - const [stakeholderOptions, setStakeholderOptions] = useState([]); + const [stakeholderOptions, setStakeholderOptions] = useState( + [], + ); const isMdOrLarger = useMediaQuery("(min-width: 640px)"); useEffect(() => { @@ -43,9 +44,7 @@ export default function ConfirmStakeholdersPage() { const handleCustomChipConfirm = (chipId: string, value: string) => { setStakeholderOptions((prev) => prev.map((opt) => - opt.id === chipId - ? { ...opt, label: value, state: "Selected" } - : opt, + opt.id === chipId ? { ...opt, label: value, state: "Selected" } : opt, ), ); }; diff --git a/app/create/select/page.tsx b/app/create/select/page.tsx index 474be3a..e74d611 100644 --- a/app/create/select/page.tsx +++ b/app/create/select/page.tsx @@ -1,6 +1,12 @@ "use client"; -import { useState, useEffect, useMemo, type Dispatch, type SetStateAction } from "react"; +import { + useState, + useEffect, + useMemo, + type Dispatch, + type SetStateAction, +} from "react"; import { useMediaQuery } from "../../hooks/useMediaQuery"; import HeaderLockup from "../../components/type/HeaderLockup"; import MultiSelect from "../../components/controls/MultiSelect"; @@ -48,17 +54,17 @@ export default function SelectPage() { const effectiveMdOrLarger = !isMounted || isMdOrLarger; - const [communitySizeOptions, setCommunitySizeOptions] = useState( - [ - { id: "1", label: "1 member", state: "Unselected" }, - { id: "2", label: "2-10 members", state: "Unselected" }, - { id: "3", label: "10-24 members", state: "Unselected" }, - { id: "4", label: "24-64 members", state: "Unselected" }, - { id: "5", label: "64-128 members", state: "Unselected" }, - { id: "6", label: "125-1000 members", state: "Unselected" }, - { id: "7", label: "1000+ members", state: "Unselected" }, - ], - ); + const [communitySizeOptions, setCommunitySizeOptions] = useState< + ChipOption[] + >([ + { id: "1", label: "1 member", state: "Unselected" }, + { id: "2", label: "2-10 members", state: "Unselected" }, + { id: "3", label: "10-24 members", state: "Unselected" }, + { id: "4", label: "24-64 members", state: "Unselected" }, + { id: "5", label: "64-128 members", state: "Unselected" }, + { id: "6", label: "125-1000 members", state: "Unselected" }, + { id: "7", label: "1000+ members", state: "Unselected" }, + ]); const [organizationTypeOptions, setOrganizationTypeOptions] = useState< ChipOption[] diff --git a/tests/components/ConfirmStakeholdersPage.test.tsx b/tests/components/ConfirmStakeholdersPage.test.tsx index 8357d80..b560dfc 100644 --- a/tests/components/ConfirmStakeholdersPage.test.tsx +++ b/tests/components/ConfirmStakeholdersPage.test.tsx @@ -34,7 +34,9 @@ describe("ConfirmStakeholdersPage", () => { ).toBeInTheDocument(); await user.click(screen.getByRole("button", { name: "Close alert" })); expect( - screen.queryByText(/Congratulations! You've drafted your CommunityRule!/i), + screen.queryByText( + /Congratulations! You've drafted your CommunityRule!/i, + ), ).not.toBeInTheDocument(); }); }); diff --git a/tests/components/InfoMessageBox.test.tsx b/tests/components/InfoMessageBox.test.tsx index 5a2964d..0ad908e 100644 --- a/tests/components/InfoMessageBox.test.tsx +++ b/tests/components/InfoMessageBox.test.tsx @@ -11,10 +11,10 @@ describe("InfoMessageBox", () => { ]; it("renders title and item labels", () => { - render( - , - ); - expect(screen.getByRole("region", { name: "Important" })).toBeInTheDocument(); + render(); + expect( + screen.getByRole("region", { name: "Important" }), + ).toBeInTheDocument(); expect(screen.getByText("Important")).toBeInTheDocument(); expect(screen.getByText("Option A")).toBeInTheDocument(); expect(screen.getByText("Option B")).toBeInTheDocument();