Skip to content

Keep optional Git setup quiet in App Studio - #1072

Merged
cwilhit merged 2 commits into
mainfrom
codex/app-studio-quiet-git-settings
Nov 11, 2026
Merged

cwilhit merged 2 commits into
mainfrom
codex/app-studio-quiet-git-settings

Conversation

@cwilhit

@cwilhit cwilhit commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Check Git connection readiness when the Git section opens. Projects without a repository show the neutral “Not connected” summary.
  • Show a plain-language status and retry when a readiness check fails. Offer the Providers link for access denials and log the cause for troubleshooting.
  • Start a fresh check on window focus, even if an earlier check is still in flight. Use the newest response.

Verification

  • Targeted Git connection and project creation readiness tests passed, including denial, service failure, retry, and overlapping checks.
  • App Studio portal type check, production build, and bundle budget passed.
  • Chromium verified the collapsed and expanded states, the workspace Providers link, and the retry flow using the App Studio component with a simulated permission denial.

Screenshots

Viewport Git collapsed Git expanded after a 403
Dark, 1280 px Collapsed Git in dark theme Git permission denial in dark theme
Light, 390 px Collapsed Git in light theme Git permission denial in light theme

@cwilhit

cwilhit commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

@mjudeikis-bot review

@mjudeikis mjudeikis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two Notes, no Critical or Warning findings.

Not anchored

  • Note: no rendered evidence for a visible UI change. The new "Couldn't check the Git connection" state, the "View providers" link and the collapsed summary change what users see. The PR says Chromium could not start, so there are no screenshots in html.dark and html.light at representative viewports. Please attach them before merge.

Checked

  • Read beyond the diff: full GitConnectionSettings.vue on the PR head; its only consumer, App.vue (projectGitSettingsOpen, openGitSettings, onGitSettingsReady, the <GitConnectionSettings> mount at ~12355); AIWorkbenchSection.vue (disclosure <details> and update:open).
  • Correctness: the generation guard still discards stale results after the watch bumps it. checking is reset in the watch, so a superseded request cannot wedge it. The collapsed state skips the request as intended. Dropping recovery from the watch is safe because check() returns early whenever repository.ref is set, and recovery implies a ref. One gap: the early return on checking can drop a focus refresh (Note on line 59).
  • Concurrency: no shared mutable state beyond component refs; generation is bumped on unmount. Nothing found.
  • Tenancy/kcp, provider contract, API/codegen/storage: not applicable. This is a portal-only change with no manifest, chart, API or Go changes. The request still goes through api.getProjectCreateReadiness(ctx), which is unchanged.
  • Security: no new fetch, header or credential path. The old code rendered the raw error message in role=alert; the new code does not. Nothing found.
  • Portal: no vendored portalkit/ or agentkit/ files edited. Rendered evidence is missing (see Not anchored).
  • Tests: gitConnectionRecovery.test.mjs covers collapsed (no call), denied, and retry. The collapsed test would fail on the old code, which always called check().
  • Commands: npm ci in providers/app-studio/portal. npx vue-tsc --noEmit clean. node --test src/gitConnectionRecovery.test.mjs run 3 times, 8 of 8 pass each time. I did not run the Go targets, make verify-*, the bundle budget or any e2e suite, because only a Vue file and its node test changed.
  • Not run: no browser, so nothing was rendered.

})
async function check() {
const current = ++generation
if (!open.value || checking.value || saving.value || props.project.repository?.ref) return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note: a focus refresh is dropped while a check is already in flight
The checking.value early return makes check() ignore a call made while a request is outstanding. The old code started a new request and superseded the old one with generation. Trigger: the user opens Git, which starts a check. They connect GitHub in another tab and return before the first response arrives. The focus handler is ignored and the pre-connect "not connected" result stays on screen until the next focus. The window is small and "Check again" recovers it, so this is a Note. To supersede instead of ignoring:

async function check() {
  if (!open.value || saving.value || props.project.repository?.ref) return
  const current = ++generation
  checking.value = true

readiness.value = result
checkFailed.value = false
}
} catch {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note: every readiness failure gets the same "View providers" guidance, and the error is dropped
catch {} discards the error. A network error or 5xx from the hub gets the same "Couldn't check the Git connection" text and "View providers" link as an access denial, and nothing is logged. The link will not help during an outage, and a real fault leaves no trace in the console. Keeping the quiet UI while logging the cause costs one line:

} catch (e) {
  console.warn('git readiness check failed', e)
  if (current === generation) {

@cwilhit
cwilhit merged commit 538ffed into main Nov 11, 2026
24 checks passed
mjudeikis pushed a commit that referenced this pull request Nov 16, 2026
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.

2 participants