Skip to content

fix: ensure proper cleanup of SSE events with AbortController#731

Merged
ogazboiz merged 18 commits into
LabsCrypt:mainfrom
extolkom:main
Jun 2, 2026
Merged

fix: ensure proper cleanup of SSE events with AbortController#731
ogazboiz merged 18 commits into
LabsCrypt:mainfrom
extolkom:main

Conversation

@extolkom
Copy link
Copy Markdown
Contributor

@extolkom extolkom commented Jun 2, 2026

Closes #651

What

Enabled noImplicitReturns and noFallthroughCasesInSwitch in frontend/tsconfig.json
and fixed all errors these flags surfaced.

Why

These two flags are cheap strictness wins that catch real bugs — functions with
inconsistent return paths and switch statements with missing breaks — before they
ship to production.

Changes

  • Added "noImplicitReturns": true to frontend/tsconfig.json
  • Added "noFallthroughCasesInSwitch": true to frontend/tsconfig.json
  • Fixed all implicit return errors across the frontend including useStreamEvents
    and dashboard-view renderContent
  • Fixed all switch fallthrough cases across the frontend
  • No logic changes — fixes are purely structural to satisfy the compiler

Testing

  • npx tsc --noEmit passes with zero errors
  • npm run build passes clean
  • Existing tests pass

Notes

  • backend/tsconfig.json is intentionally out of scope per the issue

K1NGD4VID and others added 12 commits May 30, 2026 04:36
These files were removed from tracking in 46a731f (chore: remove
test_snapshots from tracking, add to .gitignore) but were re-committed
in subsequent feature branches without being caught by the ignore rule.

The policy is clear: test_snapshots/ is auto-generated by the Soroban
test runner and must never be committed. No .gitignore changes needed.
vitest.config.ts sets coverage.provider = 'v8', which requires
@vitest/coverage-v8 as a peer. It was missing from devDependencies,
causing CI to fail with MISSING DEPENDENCY on npm test.
…pshots

chore: untrack 5 snapshot JSONs re-committed after 46a731f
Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean — closes #651 (SSE/stream-detail fetches now wrap in AbortController for cleanup on unmount). all CI green. merging!

join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

ogazboiz added 2 commits June 2, 2026 12:01
…eware-unknown-error-type

chore: replace err any with unknown and narrow safely
…-magic-numbers

Fix/pagination magic numbers
@ogazboiz
Copy link
Copy Markdown
Contributor

ogazboiz commented Jun 2, 2026

approved! but a couple of conflicting merges landed first and now this branch is DIRTY. quick rebase and it can land:

git fetch upstream
git rebase upstream/main
git push --force-with-lease

i'll auto-merge as soon as it's clean.

@extolkom
Copy link
Copy Markdown
Contributor Author

extolkom commented Jun 2, 2026

ok thank you

@ogazboiz
Copy link
Copy Markdown
Contributor

ogazboiz commented Jun 2, 2026

after rebase, the stricter tsconfig you enable in this PR (#651's noImplicitReturns / noFallthroughCasesInSwitch) now catches a real issue:

./src/components/TransactionTracker.tsx:152:13
Type error: Not all code paths return a value.

a switch or if-chain in TransactionTracker.tsx around line 152 has a branch that falls through without returning. add the missing return (or refactor to an exhaustive switch with a default). once that's fixed, the build should pass.

@ogazboiz ogazboiz merged commit 0fe1f19 into LabsCrypt:main Jun 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] tsconfig.json — enable noImplicitReturns and noFallthroughCasesInSwitch

6 participants