Skip to content
Source
Sign inSign up
TanStack/source

Create repository stays disabled after turning Import from GitHub or Monorepo off on /new #126

Closedtombeckenham opened this issue 1 comment
tombeckenhamcommented

Problem

On /new, the Create repository button stays disabled after you turn Import from GitHub or Monorepo on and then off again. No error shows on the page.

Cause

apps/web/src/routes/new.tsx:

  • The url field's validator (urlProblem, around line 553) only runs when the URL changes. With import on and the URL empty, it records "Pick a repository". Turning import off hides the field, but the error stays in the form state, so canSubmit stays false (line ~980).
  • Check members (membersProblem, around line 849) the same way. It already listens to monorepo and visibility, so confirm whether its error clears when the monorepo switch is turned off.

Fix

Re-run the url validator when importing or source changes (onChangeListenTo: ['importing', 'source']), so turning the switch off clears the error. Do the same for members if it is affected.

Done when

  • A test fails first: toggle import (or monorepo) on and off with a valid name, then expect the form to be submittable.
  • The test passes with the fix.
  • The bug is on main. Base the fix on main, not on the secrets stack.
  1. Fixed by #129 (merged): the url field now listens to importing and source, so Create repository works again after the switch is turned off.

  2. AlemTuzlak closed this

Sign in to join this conversation.