From 8c5e658cdfb3cec9d73660e54653f27c95b2ba36 Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:12 +0100 Subject: [PATCH 01/10] fix(ci): address upstream lint, TypeScript, and design-token failures Restore clean validation without relaxing any checks. --- .../src/features/trade/components/chart/TVChartContainer.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/web/src/features/trade/components/chart/TVChartContainer.tsx b/apps/web/src/features/trade/components/chart/TVChartContainer.tsx index b4713897..14e47629 100644 --- a/apps/web/src/features/trade/components/chart/TVChartContainer.tsx +++ b/apps/web/src/features/trade/components/chart/TVChartContainer.tsx @@ -28,9 +28,6 @@ import type { OhlcBar } from "../../lib/oracle" import { useWalletStore } from "@/features/wallet/store/wallet-store" import { formatUsd } from "@/shared/lib/format" import { ENV } from "@/app/config/env" -import type { CandlestickData, IChartApi, IPriceLine, ISeriesApi, UTCTimestamp } from "lightweight-charts" -import type { OhlcBar } from "../../lib/oracle" -import { useWalletStore } from "@/features/wallet/store/wallet-store" type ChartLine = { id: string From cf4702248663b6f27a8ad30b6377f5bf58d4b8cf Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:14 +0100 Subject: [PATCH 02/10] fix(ci): address upstream lint, TypeScript, and design-token failures Restore clean validation without relaxing any checks. --- apps/web/src/shared/hooks/useTxSubmit.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/web/src/shared/hooks/useTxSubmit.tsx b/apps/web/src/shared/hooks/useTxSubmit.tsx index 7dff23a0..da27dd73 100644 --- a/apps/web/src/shared/hooks/useTxSubmit.tsx +++ b/apps/web/src/shared/hooks/useTxSubmit.tsx @@ -1,8 +1,8 @@ -import { useCallback, useState, useRef } from "react" +import { useCallback, useRef, useState } from "react" import { toast } from "@workspace/ui/components/toast" +import { useTxFeedback } from "./useTxFeedback" import { sendAndPoll } from "@/lib/tx-builder" import { explorerTxUrl } from "@/app/config/network" -import { useTxFeedback } from "./useTxFeedback" export type SubmitTxOptions = { loadingMessage: string @@ -81,14 +81,14 @@ export function useTxSubmit() { error: null, }) const feedback = useTxFeedback() - // #733: Track attempt identity to detect and prevent duplicate submissions + // Issue 733: Track attempt identity to detect and prevent duplicate submissions const attemptIdRef = useRef(null) - // #733: Guard against double-click, Enter+click, component rerender triggering multiple submissions + // Issue 733: Guard against double-click, Enter+click, component rerender triggering multiple submissions const submitInProgressRef = useRef(false) const submit = useCallback( async (getSignedXdr: () => Promise, options: SubmitTxOptions): Promise => { - // #733: Prevent duplicate submission (double-click, accidental Enter+click, rerender) + // Issue 733: Prevent duplicate submission (double-click, accidental Enter+click, rerender) if (submitInProgressRef.current) { throw new Error("Submission already in progress") } @@ -113,15 +113,15 @@ export function useTxSubmit() { [], ) - // #732: Extended submit that integrates with transaction feedback controller + // Issue 732: Extended submit that integrates with transaction feedback controller const submitWithFeedback = useCallback( async (getSignedXdr: () => Promise, options: SubmitTxOptions): Promise => { const attemptId = `txn-${Date.now()}-${Math.random().toString(36).slice(2, 9)}` attemptIdRef.current = attemptId - const attempt = feedback.createAttempt(attemptId) + feedback.createAttempt(attemptId) - // #733: Prevent duplicate submission with attempt tracking + // Issue 733: Prevent duplicate submission with attempt tracking if (submitInProgressRef.current) { feedback.handleEvent({ type: "error", @@ -144,7 +144,7 @@ export function useTxSubmit() { const response = await sendAndPoll(signedXdr) return response.hash } catch (submitError) { - // #733: Unknown submission outcome — signal for status lookup + // Issue 733: Unknown submission outcome — signal for status lookup const errorMsg = submitError instanceof Error ? submitError.message : "Submission failed" if (errorMsg.includes("unknown")) { feedback.handleEvent({ type: "unknown_outcome" }) @@ -181,7 +181,7 @@ export function useTxSubmit() { submitInProgressRef.current = false throw error } finally { - // #733: Keep attempt ID for status lookup in case of unknown outcomes + // Issue 733: Keep attempt ID for status lookup in case of unknown outcomes // Do NOT clear immediately — let status lookup use it if needed } }, @@ -190,7 +190,7 @@ export function useTxSubmit() { return { submit, - // #732 & #733: Extended submit with transaction feedback controller + // Issues 732 and 733: Extended submit with transaction feedback controller submitWithFeedback, isLoading: state.isLoading, txHash: state.txHash, From ff4a8bdc8d3e8eb98838b8b5f430b951620b36cc Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:17 +0100 Subject: [PATCH 03/10] fix(ci): address upstream lint, TypeScript, and design-token failures Restore clean validation without relaxing any checks. --- apps/web/src/shared/hooks/useTxFeedback.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/shared/hooks/useTxFeedback.tsx b/apps/web/src/shared/hooks/useTxFeedback.tsx index 278148b3..f06a7022 100644 --- a/apps/web/src/shared/hooks/useTxFeedback.tsx +++ b/apps/web/src/shared/hooks/useTxFeedback.tsx @@ -2,7 +2,7 @@ import { useCallback, useRef } from "react" import { toast } from "@workspace/ui/components/toast" import { explorerTxUrl } from "@/app/config/network" -// #732: Explicit lifecycle events for transaction feedback without English message matching +// Issue 732: Explicit lifecycle events for transaction feedback without English message matching export type TxFeedbackEvent = | { type: "signing"; message: string } | { type: "signed" } @@ -15,7 +15,7 @@ export type TxFeedbackEvent = | { type: "error"; message: string } | { type: "unknown_outcome"; hash?: string } -// #732: Each attempt gets its own stable toast ID; concurrent transactions don't interfere +// Issue 732: Each attempt gets its own stable toast ID; concurrent transactions don't interfere type TxAttempt = { readonly attemptId: string readonly createdAt: number @@ -143,7 +143,7 @@ export function useTxFeedback() { break case "unknown_outcome": - // #733: Unknown submission outcome — status should be looked up by hash if available + // Issue 733: Unknown submission outcome — status should be looked up by hash if available attempt.status = "submitted" if (attempt.toastId) { toast.show({ From 9ced037376f0abe01400275c8160738bada62dff Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:21 +0100 Subject: [PATCH 04/10] fix(ci): address upstream lint, TypeScript, and design-token failures Restore clean validation without relaxing any checks. --- .../src/features/wallet/components/NetworkMismatchBanner.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/features/wallet/components/NetworkMismatchBanner.tsx b/apps/web/src/features/wallet/components/NetworkMismatchBanner.tsx index ebb0b236..7c8aa98d 100644 --- a/apps/web/src/features/wallet/components/NetworkMismatchBanner.tsx +++ b/apps/web/src/features/wallet/components/NetworkMismatchBanner.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect } from "react" +import { useEffect, useState } from "react" import { useLocation } from "@tanstack/react-router" import { useNetwork } from "../hooks/useNetwork" import { useWalletStore } from "../store/wallet-store" @@ -14,7 +14,7 @@ export function NetworkMismatchBanner() { useEffect(() => { try { - if (typeof window !== "undefined" && sessionStorage) { + if (typeof window !== "undefined") { setDismissed(sessionStorage.getItem(SESSION_KEY) === "1") } } catch { From 75610383c62ade7bfc9fa294a211692b843e7b91 Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:24 +0100 Subject: [PATCH 05/10] fix(ci): address upstream lint, TypeScript, and design-token failures Restore clean validation without relaxing any checks. --- apps/web/src/ui/theme-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/ui/theme-provider.tsx b/apps/web/src/ui/theme-provider.tsx index 23532a28..e493216c 100644 --- a/apps/web/src/ui/theme-provider.tsx +++ b/apps/web/src/ui/theme-provider.tsx @@ -58,7 +58,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) { resolve(next) === resolve(theme) || window.matchMedia("(prefers-reduced-motion: reduce)").matches || document.documentElement.dataset.reducedMotion === "true" || - !document.startViewTransition + !Reflect.has(document, "startViewTransition") ) { activeTransition.current?.skipTransition() apply() From 93fa9be52e8002d5018e4656f36011d9788edaa5 Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:26 +0100 Subject: [PATCH 06/10] fix(ci): address upstream lint, TypeScript, and design-token failures Restore clean validation without relaxing any checks. --- apps/docs/src/lib/excerpt-renderer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/lib/excerpt-renderer.tsx b/apps/docs/src/lib/excerpt-renderer.tsx index a5a52f7f..f931be94 100644 --- a/apps/docs/src/lib/excerpt-renderer.tsx +++ b/apps/docs/src/lib/excerpt-renderer.tsx @@ -23,7 +23,7 @@ export function renderExcerpt(excerpt: string): React.ReactNode { .replace(//g, ">") .replace(/"/g, """) - .replace(/'/g, "'") + .replace(/'/g, "'") if (inMark) { elements.push( @@ -51,5 +51,5 @@ export function getExcerptText(excerpt: string): string { .replace(/</g, "<") .replace(/>/g, ">") .replace(/"/g, '"') - .replace(/'/g, "'") + .replace(/'/g, "'") } From 2bff39bd8f6e8ddf03959349a4c497621259c7fd Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:29 +0100 Subject: [PATCH 07/10] fix(ci): address upstream lint, TypeScript, and design-token failures Restore clean validation without relaxing any checks. --- .../src/features/trade/components/trade-panel/TradePanel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/features/trade/components/trade-panel/TradePanel.tsx b/apps/web/src/features/trade/components/trade-panel/TradePanel.tsx index 8f40ec76..3fe83cec 100644 --- a/apps/web/src/features/trade/components/trade-panel/TradePanel.tsx +++ b/apps/web/src/features/trade/components/trade-panel/TradePanel.tsx @@ -1,5 +1,4 @@ import { useEffect, useMemo, useState } from "react" -import { explorerTxUrl } from "@/app/config/network" import { Tabs, TabsContent, @@ -27,6 +26,7 @@ import { ConfirmationDialog } from "./ConfirmationDialog" import { ApplyReferralCodePrompt } from "./ApplyReferralCodePrompt" import { LeverageSlider } from "./LeverageSlider" import type { TradeMode, TradeType, useTradeState } from "../../hooks/useTradeState" +import { explorerTxUrl } from "@/app/config/network" import { NumberInput } from "@/shared/components/NumberInput" import { useWalletStore } from "@/features/wallet/store/wallet-store" import { TokenIcon } from "@/shared/components/TokenIcon" From 7a3c8ac77cff0e82395476e74964d771ae45a708 Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:33:48 +0100 Subject: [PATCH 08/10] test(ci): execute full upstream baseline gates during repair --- .github/workflows/commit-gate-diagnostics.yml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/commit-gate-diagnostics.yml diff --git a/.github/workflows/commit-gate-diagnostics.yml b/.github/workflows/commit-gate-diagnostics.yml new file mode 100644 index 00000000..4e5b69c9 --- /dev/null +++ b/.github/workflows/commit-gate-diagnostics.yml @@ -0,0 +1,58 @@ +name: Commit gate diagnostics (temporary) +on: + push: + branches: ["fix/upstream-commit-gate-baseline"] +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 35 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.3.13 + - name: Install frozen dependencies + run: bun install --frozen-lockfile + - name: Lint + if: ${{ success() || failure() }} + run: bun lint + - name: Typecheck + if: ${{ success() || failure() }} + run: bun typecheck + - name: Design tokens + if: ${{ success() || failure() }} + run: bun run check:tokens + - name: Docs content + if: ${{ success() || failure() }} + run: bun run check:content + - name: Unit tests + if: ${{ success() || failure() }} + run: bun run test + - name: Coverage + if: ${{ success() || failure() }} + run: bun run test:coverage + - name: Build + if: ${{ success() || failure() }} + run: bun run build + - name: Indexer codegen + if: ${{ success() || failure() }} + run: bun run --cwd apps/s03-indexer codegen + - name: Indexer build + if: ${{ success() || failure() }} + run: bun run --cwd apps/s03-indexer build + - name: Indexer tests + if: ${{ success() || failure() }} + run: bun run --cwd apps/s03-indexer test + - name: Indexer local manifest + if: ${{ success() || failure() }} + run: | + SO4_CONTRACTS_REPO="$PWD/apps/s03-indexer/tests/fixtures/contracts-repo" bun run --cwd apps/s03-indexer sync:contracts:local + bash scripts/validate-manifest.sh apps/s03-indexer/config/contracts.local.json + - name: Web typecheck + if: ${{ success() || failure() }} + run: bun run --cwd apps/web typecheck + - name: Web build + if: ${{ success() || failure() }} + run: bun run --cwd apps/web build From ee8a0f8215c78b4f77d3d6ea260acaa1b4568c40 Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:35:42 +0100 Subject: [PATCH 09/10] fix(ci): correct frozen-order banner imports and session guard --- .../trade/components/positions/OrderExecutionFrozenBanner.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/features/trade/components/positions/OrderExecutionFrozenBanner.tsx b/apps/web/src/features/trade/components/positions/OrderExecutionFrozenBanner.tsx index 2a7a3f55..e93666dd 100644 --- a/apps/web/src/features/trade/components/positions/OrderExecutionFrozenBanner.tsx +++ b/apps/web/src/features/trade/components/positions/OrderExecutionFrozenBanner.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect } from "react" +import { useEffect, useState } from "react" import { ORDER_EXECUTION_FROZEN_MESSAGE } from "@/lib/contracts" const SESSION_KEY = "so4-order-execution-frozen-dismissed" @@ -12,7 +12,7 @@ export function OrderExecutionFrozenBanner({ visible }: Props) { useEffect(() => { try { - if (typeof window !== "undefined" && sessionStorage) { + if (typeof window !== "undefined") { setDismissed(sessionStorage.getItem(SESSION_KEY) === "1") } } catch { From 696723aa498fe06010b6542ac504181852cd6495 Mon Sep 17 00:00:00 2001 From: DemolaCodes Date: Sun, 18 Oct 2026 22:41:09 +0100 Subject: [PATCH 10/10] chore: remove temporary commit-gate diagnostics after all checks passed --- .github/workflows/commit-gate-diagnostics.yml | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 .github/workflows/commit-gate-diagnostics.yml diff --git a/.github/workflows/commit-gate-diagnostics.yml b/.github/workflows/commit-gate-diagnostics.yml deleted file mode 100644 index 4e5b69c9..00000000 --- a/.github/workflows/commit-gate-diagnostics.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Commit gate diagnostics (temporary) -on: - push: - branches: ["fix/upstream-commit-gate-baseline"] -jobs: - verify: - runs-on: ubuntu-latest - timeout-minutes: 35 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.3.13 - - name: Install frozen dependencies - run: bun install --frozen-lockfile - - name: Lint - if: ${{ success() || failure() }} - run: bun lint - - name: Typecheck - if: ${{ success() || failure() }} - run: bun typecheck - - name: Design tokens - if: ${{ success() || failure() }} - run: bun run check:tokens - - name: Docs content - if: ${{ success() || failure() }} - run: bun run check:content - - name: Unit tests - if: ${{ success() || failure() }} - run: bun run test - - name: Coverage - if: ${{ success() || failure() }} - run: bun run test:coverage - - name: Build - if: ${{ success() || failure() }} - run: bun run build - - name: Indexer codegen - if: ${{ success() || failure() }} - run: bun run --cwd apps/s03-indexer codegen - - name: Indexer build - if: ${{ success() || failure() }} - run: bun run --cwd apps/s03-indexer build - - name: Indexer tests - if: ${{ success() || failure() }} - run: bun run --cwd apps/s03-indexer test - - name: Indexer local manifest - if: ${{ success() || failure() }} - run: | - SO4_CONTRACTS_REPO="$PWD/apps/s03-indexer/tests/fixtures/contracts-repo" bun run --cwd apps/s03-indexer sync:contracts:local - bash scripts/validate-manifest.sh apps/s03-indexer/config/contracts.local.json - - name: Web typecheck - if: ${{ success() || failure() }} - run: bun run --cwd apps/web typecheck - - name: Web build - if: ${{ success() || failure() }} - run: bun run --cwd apps/web build