Repository navigation
Keep optional Git setup quiet in App Studio - #1072
Conversation
|
@mjudeikis-bot review |
mjudeikis
left a comment
There was a problem hiding this comment.
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.darkandhtml.lightat representative viewports. Please attach them before merge.
Checked
- Read beyond the diff: full
GitConnectionSettings.vueon the PR head; its only consumer,App.vue(projectGitSettingsOpen,openGitSettings,onGitSettingsReady, the<GitConnectionSettings>mount at ~12355);AIWorkbenchSection.vue(disclosure<details>andupdate:open). - Correctness: the generation guard still discards stale results after the watch bumps it.
checkingis reset in the watch, so a superseded request cannot wedge it. The collapsed state skips the request as intended. Droppingrecoveryfrom the watch is safe becausecheck()returns early wheneverrepository.refis set, and recovery implies a ref. One gap: the early return oncheckingcan drop a focus refresh (Note on line 59). - Concurrency: no shared mutable state beyond component refs;
generationis 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/oragentkit/files edited. Rendered evidence is missing (see Not anchored). - Tests:
gitConnectionRecovery.test.mjscovers collapsed (no call), denied, and retry. The collapsed test would fail on the old code, which always calledcheck(). - Commands:
npm ciinproviders/app-studio/portal.npx vue-tsc --noEmitclean.node --test src/gitConnectionRecovery.test.mjsrun 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 |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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) {
Summary
Verification
Screenshots