chore(welcome): remove orphaned useBackendReachable probe (#2037)#3410
Merged
senamakel merged 1 commit intoJun 5, 2026
Merged
Conversation
…ai#2037) The useBackendReachable hook and its test were added in tinyhumansai#2208 to gate the "Continue locally" CTA on backend reachability, but a later commit in that same PR (route local users through manual setup) intentionally de-wired the probe and made the CTA unconditional, locking that in via tests asserting the button renders regardless of runtime mode. The hook has had zero importers since, and its docstring still claims the CTA "is gated on unreachable ... per issue tinyhumansai#2037 AC" — stale, contradicting the shipped always-on design. Remove the dead hook + test so knip stops flagging it and the misleading docstring no longer implies an unmet AC.
Contributor
📝 WalkthroughWalkthroughThis PR removes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useBackendReachablehook (app/src/hooks/useBackendReachable.ts) and its test — dead code with zero importers.unreachable… per issue Add a local-only escape hatch in onboarding when api.tinyhumans.ai is unreachable #2037 AC", which is stale: the shipped design renders that CTA unconditionally.Problem
In #2208 the maintainer first added
useBackendReachableand gated the Welcome "Continue locally" CTA on a backend-reachability probe (commitdf85d78f1, "Per #2037 AC, the offline-login button must only appear when the backend is unreachable"). A later commit in the same PR —6ccd170a6"route local users through manual setup" — deliberately de-wired the probe, made the CTA unconditional, and updated the Welcome tests to assert the button renders "regardless of runtime mode" / "in cloud mode too".The result on
main: the CTA is intentionally always-on, butuseBackendReachable.tsand its test were left behind with no importers and a docstring that documents an approach the maintainer's own later commit reversed.knipflags it, and the stale docstring misleads anyone reading it into thinking an AC is unmet.Solution
Delete
app/src/hooks/useBackendReachable.tsandapp/src/hooks/__tests__/useBackendReachable.test.tsx. Nothing imports either (verified repo-wide).getBackendUrl— the only thing the hook depended on — remains in use by 10 other call sites and is untouched.This intentionally does not re-introduce the probe/banner UX. That would reverse a deliberate maintainer decision; if that UX is still wanted it should be a separate, discussed change.
Submission Checklist
diff-coverhas no new lines to cover.## Related.Impact
knipunused-export finding; eliminates a misleading docstring.Related
feat(auth): add local offline login).AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
chore/2037-remove-orphaned-backend-probe37aff1441Validation Run
pnpm --filter openhuman-app format:checkpnpm typecheckrust:checkpassed regardless).Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Summary by CodeRabbit
Tests
Chores