Skip to content

feat: add repo browser source view#583

Merged
mariusvniekerk merged 21 commits into
mainfrom
repo-browser-main-ui
Jun 25, 2026
Merged

feat: add repo browser source view#583
mariusvniekerk merged 21 commits into
mainfrom
repo-browser-main-ui

Conversation

@mariusvniekerk

@mariusvniekerk mariusvniekerk commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

With the API and store boundary in place, maintainers need an actual code-reading workspace rather than another summary-card drilldown. This PR assembles the source view around ref and path navigation, the reusable file tree, source and Markdown rendering, and selected-file commit history.

Repository content is untrusted and refs can move, so the view keeps raw bytes and asset decisions behind backend preflight contracts while still giving reviewers a usable, forge-like repository browser.

@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (6d7303e)

Medium confidence: two medium-severity issues need addressing; security review found no issues.

Medium

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:86
    The route only applies route.mode when present, but buildRepoBrowserRoute omits mode for the default "source" view. Navigating back/forward from mode=preview to a source URL, or opening a source deep link after preview was persisted in localStorage, can leave the UI in preview mode while the URL represents source mode.
    Fix: Treat missing mode as "source" when syncing route state, both in the effect and initial loadRoute.

  • frontend/src/App.svelte:1124
    This adds a new user-visible source browser route backed by real repo browser API data, but the diff only adds unit-level route/view-state tests. There is no e2e/full-stack coverage proving /repo/browser loads refs, tree, blob content, markdown preview/assets, and history through the real HTTP API and SQLite-backed repo identity path.
    Fix: Add an e2e or full-stack browser/API test that opens a seeded repo browser route and verifies the main source-browser workflow against the real server.


Panel: ci_default_security | Synthesis: codex, 19s | Members: codex_default (codex/default, done, 3m43s), codex_security (codex/security, done, 3m48s) | Total: 7m50s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from 860ef47 to 2bc2a01 Compare June 23, 2026 20:11
@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (816d598)

Review verdict: changes need fixes before merge due to stale route mutation and Markdown image loading risks.

Medium

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:104
    loadRoute can keep mutating route state after a newer route load has started. An older no-path load that finishes late can run the initial-path block and call pushRoute, overwriting the current URL/selection with stale work. Track a component-level load generation or captured route key, and bail after each await before selecting or pushing the initial path.

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:446
    Repository-controlled Markdown is rendered through DocMarkdownView, which preserves external Markdown image URLs as <img src="...">. A contributor can cause the maintainer’s browser to automatically issue GET requests to arbitrary http(s) URLs, including loopback or intranet hosts, when previewing a README or other Markdown file. Disable external image loads for repo-browser previews, or only allow images resolved through the repo asset endpoint; render external images as inert links unless explicitly opened.


Panel: ci_default_security | Synthesis: codex, 9s | Members: codex_default (codex/default, done, 10m3s), codex_security (codex/security, done, 3m19s) | Total: 13m31s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from 2bc2a01 to df74f6f Compare June 23, 2026 21:48
@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from df74f6f to f0796b6 Compare June 23, 2026 22:03
@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (7e2a5ca)

Verdict: No Medium, High, or Critical findings to report.

The only findings reported were Low severity, so they are omitted per instructions.


Panel: ci_default_security | Synthesis: codex, 5s | Members: codex_default (codex/default, done, 6m5s), codex_security (codex/security, done, 4m43s) | Total: 10m53s

@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (fb8cdad)

Medium severity findings need fixes before merge.

Medium

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:179
    Rapid file selections can race: an older store.selectPath(path) call can finish after a newer one and still call pushRoute({ path }), reverting the URL and potentially triggering a stale file reload. Guard selectPath with a local generation token, or verify store.getSelectedPath() === path before pushing the route.

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:454
    Repository Markdown previews render contributor-controlled files through DocMarkdownView. Even with allowExternalImages: false, Mermaid fences can still be enhanced globally, and Mermaid image nodes can force the maintainer’s browser to fetch attacker-controlled URLs. Disable Mermaid rendering for repo-browser previews, or add a trusted/untrusted Markdown option so Mermaid renders as plain code when external images are disallowed. Add coverage that Mermaid image nodes in repo-browser Markdown do not trigger external requests.


Panel: ci_default_security | Synthesis: codex, 7s | Members: codex_default (codex/default, done, 7m15s), codex_security (codex/security, done, 4m34s) | Total: 11m56s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from f0796b6 to 4fc4351 Compare June 23, 2026 22:15
@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (c0f2afd)

Medium confidence to merge after fixing one route bug; no Critical or High findings.

Medium

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:264
    Markdown preview document links are built with buildRepoBrowserRoute() directly, so their href values omit the configured app base path. Under a non-root __BASE_PATH__, copied or opened repo browser doc links point at /repo/browser?... instead of the mounted app path. Wrap the generated route with withBasePath(...), matching the Docs workspace link builder.

Panel: ci_default_security | Synthesis: codex, 7s | Members: codex_default (codex/default, done, 7m23s), codex_security (codex/security, done, 5m17s) | Total: 12m47s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from 4fc4351 to 05f959f Compare June 23, 2026 22:27
@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (aa81cbf)

Summary verdict: One medium issue should be fixed before merge; no material security regressions were found.

Medium

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:313
    In-app markdown links with anchors scroll correctly but drop the #anchor from the URL because openMarkdownDoc only stores the anchor in local state and later pushRoute calls rebuild the route without a hash. Refreshing or sharing the clicked link lands at the top of the file instead of the target heading.

    Suggested fix: Thread the optional anchor through route updates or explicitly preserve/update location.hash, and assert the hash in the repo-browser e2e test.


Panel: ci_default_security | Synthesis: codex, 15s | Members: codex_default (codex/default, done, 7m53s), codex_security (codex/security, done, 7m19s) | Total: 15m27s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from 05f959f to cd6a9ae Compare June 23, 2026 23:08
@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (4705f94)

Medium issue found; security review found no additional Medium-or-higher issues.

Medium

  • frontend/src/lib/stores/router.svelte.ts:203 - parseRoute parses raw paths from navigate() with the #fragment still attached. Repo browser links such as /repo/browser?...&mode=preview#api-reference make mode parse as preview#api-reference, so the routed view mode is dropped and the feature can switch back to source instead of showing or scrolling the preview. Strip the hash before splitting pathname/query, or parse through new URL, and add a router test for repo browser routes with fragments.

Panel: ci_default_security | Synthesis: codex, 6s | Members: codex_default (codex/default, done, 4m12s), codex_security (codex/security, done, 2m55s) | Total: 7m13s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from cd6a9ae to 4087f8b Compare June 23, 2026 23:31
@roborev-ci

roborev-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

roborev: Combined Review (92a12e4)

Verdict: Two medium-severity navigation issues should be fixed before merge.

Medium

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:185
    selectPath and openMarkdownDoc push a route after awaiting store.selectPath(path) without checking whether a newer selection happened while the first request was in flight. A slow earlier blob/history request can finish after a later click and navigate the user back to the older file.
    Fix: Add a component-level selection generation/token, or check store.getSelectedPath() === path before incrementing reveal state and calling pushRoute.

  • frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte:314
    Markdown anchors are read only on initial mount and when openMarkdownDoc handles an in-app click. Browser Back/Forward to a repo-browser URL with #anchor changes window.location.hash, but the router drops the fragment and the component never refreshes pendingMarkdownAnchor, so forward/back navigation to anchored docs loads the file without scrolling to the heading.
    Fix: Preserve the fragment in route state or read window.location.hash during route/path changes, then set pendingMarkdownAnchor before/after selecting the routed markdown file.


Panel: ci_default_security | Synthesis: codex, 11s | Members: codex_default (codex/default, done, 5m20s), codex_security (codex/security, done, 3m40s) | Total: 9m11s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from 4087f8b to 28baf8e Compare June 23, 2026 23:53
@mariusvniekerk

Copy link
Copy Markdown
Collaborator Author

@roborev-ci

roborev-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

roborev: Combined Review (d790905)

No Medium, High, or Critical findings were reported.

The security review found no issues. The only default-review findings were Low severity and are omitted per the requested threshold.


Panel: ci_default_security | Synthesis: codex, 5s | Members: codex_default (codex/default, done, 9m18s), codex_security (codex/security, done, 5m49s) | Total: 15m12s

@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from fe384eb to 0544c65 Compare June 25, 2026 15:50
@mariusvniekerk mariusvniekerk force-pushed the repo-browser-state-file-ui branch from 0544c65 to 3463598 Compare June 25, 2026 15:52
Base automatically changed from repo-browser-state-file-ui to main June 25, 2026 15:53
mariusvniekerk and others added 21 commits June 25, 2026 11:54
Maintainers need the repo browser to be usable from a routed app surface, not just exposed as backend and store primitives. This branch composes the first full read-only browser screen around the shared file tree, route state, markdown preview, and selected-file history so reviewers can evaluate the interaction as one coherent unit.

The view keeps source browsing separate from PR diff state while reusing the existing file tree and docs markdown renderer. Route parsing preserves provider-aware repository identity and selected ref/path state so later command-palette and contextual entry points can deep-link into the same surface.

Validation: cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit src/lib/stores/router.test.ts src/lib/features/repo-browser/repoBrowserViewState.test.ts; node node_modules/vite-plus/bin/vp run ui-package-check; node node_modules/vite-plus/bin/vp run frontend-package-check; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; git diff --check. Ephemeral dev API smoke verified refs/tree/blob for kenn-io/middleman main; Playwright Chrome automation timed out locally after the API and frontend route returned successfully.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The source browser route encodes Source mode by omitting the mode parameter, so route sync must treat a missing value as an explicit source selection instead of preserving stale local preview state.

The full-stack e2e fixture now points acme/widgets at the local seeded clone so the visible repo browser page can be exercised through the real HTTP API and SQLite data rather than only mocked store calls.

Validation: go test ./internal/testutil -shuffle=on; node node_modules/vite-plus/bin/vp fmt --check frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte frontend/tests/e2e-full/repo-browser.spec.ts --no-error-on-unmatched-pattern --threads=1; node node_modules/vite-plus/bin/vp run frontend-package-typecheck; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium --project=firefox; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Markdown preview links can carry heading anchors through the shared docs renderer. The repo browser reused that renderer but dropped the anchor callback, so in-repo links to another heading could switch documents without targeting the intended section.

This mirrors the docs workspace one-shot anchor handoff while keeping source-browser routing focused on the selected file and preview mode.

Validation: node node_modules/vite-plus/bin/vp fmt --check frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte frontend/tests/e2e-full/repo-browser.spec.ts --no-error-on-unmatched-pattern --threads=1; node node_modules/vite-plus/bin/vp run frontend-package-typecheck; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium --project=firefox.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repo-browser markdown links can be opened directly or clicked from an already rendered document, so anchor state has to survive both the initial URL hash and the asynchronous blob load for cross-document navigation.

The seeded e2e repo now includes an anchored Markdown guide so the full-stack browser test proves the renderer callback, route hash seed, real blob API, and scroll behavior together.

Validation: go test ./internal/testutil -shuffle=on; node node_modules/vite-plus/bin/vp fmt --check frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte frontend/tests/e2e-full/repo-browser.spec.ts --no-error-on-unmatched-pattern --threads=1; node node_modules/vite-plus/bin/vp run frontend-package-typecheck; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium --project=firefox; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Branch and tag routes can name a ref without carrying a resolved commit SHA. Sending that name back as ref_sha made unpinned routes look pinned and could confuse stale-ref handling.

URL-derived refs now omit ref_sha unless the route has a real SHA, and the store reconciles named branch/tag routes with the API refs before loading tree/blob data.

Validation: go test ./internal/testutil -shuffle=on; node node_modules/vite-plus/bin/vp fmt --check frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte frontend/tests/e2e-full/repo-browser.spec.ts packages/ui/src/stores/repo-browser.svelte.ts --no-error-on-unmatched-pattern --threads=1; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit ../packages/ui/src/stores/repo-browser.svelte.test.ts; node node_modules/vite-plus/bin/vp run frontend-package-typecheck; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium --project=firefox; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The ref route fix needs full-stack coverage for URLs that name a branch without a resolved SHA. The repo-browser e2e now opens that route through the real server and asserts the API flow does not send the branch name as ref_sha or mark the resolved ref stale.

Validation: node node_modules/vite-plus/bin/vp fmt --check frontend/tests/e2e-full/repo-browser.spec.ts --no-error-on-unmatched-pattern --threads=1; node node_modules/vite-plus/bin/vp run frontend-package-typecheck; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium --project=firefox; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repo browser route loads can overlap when navigation changes while the initial file selection is still resolving, so the component now ignores stale load completions before they mutate selection or URL state.

Repository Markdown previews also opt out of automatic external image loads while docs mode keeps its existing behavior. External Markdown images render as explicit links, and repo-local images continue to flow through the asset endpoint.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repo browser markdown links with fragments must leave the fragment in the URL, otherwise refreshes and shared links reopen the file at the top instead of the clicked heading. Route updates now carry the anchor in the same navigation that opens preview mode.

Validation: (cd frontend && ../node_modules/.bin/vp test); node node_modules/vite-plus/bin/vp run ui-package-check; node_modules/.bin/vp exec svelte-mcp svelte-autofixer ./frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte --svelte-version 5; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repo browser markdown fragments need to survive the real router path, not only the component callback boundary. The router now strips fragments before parsing query parameters, and route-driven path synchronization no longer pushes stale URLs after async file loads complete.

The repo-browser full-stack spec now proves clicked markdown fragments stay in the URL and that untrusted external markdown images render as links instead of external image loads.

Validation: (cd frontend && ../node_modules/.bin/vp test src/lib/features/repo-browser/RepoBrowserFeature.test.ts src/lib/stores/router.test.ts ../packages/ui/src/routes.test.ts); (cd frontend && ../node_modules/.bin/vp test); node node_modules/vite-plus/bin/vp run ui-package-check; (cd frontend && ../node_modules/.bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts); go test ./internal/testutil -shuffle=on; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repo browser markdown navigation can change the URL fragment without changing the selected file, especially through browser Back and Forward. The router needs to keep that fragment in route state, and the component needs to treat route anchors as one-shot scroll inputs so hash-only navigation still reaches the requested heading.

Async file selection also needs a local generation guard so a slower markdown navigation cannot push an older path after a newer selection wins. Markdown asset URLs now use immutable commit refs to match the hardened asset API below this branch.

Validation: cd frontend && ../node_modules/.bin/vp test src/lib/features/repo-browser/RepoBrowserFeature.test.ts src/lib/stores/router.test.ts ../packages/ui/src/routes.test.ts; node_modules/.bin/vp exec svelte-mcp svelte-autofixer frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte --svelte-version 5; cd frontend && ../node_modules/.bin/vp test; node node_modules/vite-plus/bin/vp run ui-package-check; cd frontend && ../node_modules/.bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Branch and tag routes can gain a resolved SHA after the first repo load. That SHA is useful in the URL, but treating it as route identity causes a second full repository load for the same logical ref.

Keep SHA-sensitive route identity for direct commit browsing while allowing symbolic branch and tag routes to update their resolved SHA without reloading the source view.

Validation: vp exec svelte-mcp svelte-autofixer ./frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit src/lib/features/repo-browser/RepoBrowserFeature.test.ts; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; node node_modules/vite-plus/bin/vp run frontend-package-check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The repo-browser route effect should react to route changes, not to local selection mutations. After removing SHA-only reloads, markdown link navigation exposed that local file selection could retrigger the effect against the old route and select the previous file back before the URL update landed.

Read the current selected path and view mode untracked inside the route effect so user-driven file changes can complete and push their route update without being reverted by stale route state.

Validation: vp exec svelte-mcp svelte-autofixer ./frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit src/lib/features/repo-browser/RepoBrowserFeature.test.ts; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; node node_modules/vite-plus/bin/vp run frontend-package-check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Branch routes gain a resolved SHA after the initial repo-browser load, and that URL replacement crosses the real App/router boundary. The previous component test proved the local effect behavior but did not protect against duplicate repo/tree loads through route parsing and rerendering.

Add a full-stack Playwright regression that opens a symbolic branch route without path/ref_sha, waits for the resolved URL, and asserts the browser performed only one refs load and one tree load.

Validation: cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium --project=firefox; cd frontend && node ../node_modules/vite-plus/bin/vp test run; node node_modules/vite-plus/bin/vp run frontend-package-check.

Generated with Codex

Co-authored-by: Codex <codex@openai.com>
Repo-browser route changes need to look like repository navigation to host integrations, including markdown URL fragments. The feature also should not reload the same repo/ref immediately after a user ref selection pushes the matching route.

Update route event mapping to preserve hashes and mark repo-browser as repos, and pre-seed the feature load key when ref selection has already loaded the target state.

Validation: node node_modules/vite-plus/bin/vp exec svelte-mcp svelte-autofixer frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte --svelte-version 5; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit src/lib/stores/router.test.ts src/lib/features/repo-browser/RepoBrowserFeature.test.ts ../packages/ui/src/routes.test.ts ../packages/ui/src/stores/repo-browser.svelte.test.ts; node node_modules/vite-plus/bin/vp run frontend-check.

Generated with Codex

Co-authored-by: Codex <codex@openai.com>
Record the resolved selected-ref route key before self-replacing no-ref repo browser routes, so the router update does not trigger a second repository load after the initial file selection.
Update the repo browser feature test client to match the store behavior that reads file metadata and blobs through the resolved tree commit instead of mutable branch or tag refs.
Repo browser routes need to distinguish a self-replaced resolved SHA from a later route where the same branch or tag name points at a different commit. Keeping all resolved SHAs in the route key after load prevents stale tree/blob/history state while preserving the no-extra-load self-replacement path.

The markdown renderer also needs to classify external URLs after the same control-character normalization used by the unsafe URI checks. Otherwise repo preview images with obfuscated http(s) destinations can bypass the external-image toggle or be stripped inconsistently by sanitization.

Validation: ./node_modules/.bin/vp exec svelte-mcp svelte-autofixer frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte; ./node_modules/.bin/vp run frontend-check; cd frontend && ../node_modules/.bin/vp test run --project unit.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repo-browser route reload fixes need full-stack coverage because duplicate or missing loads only fully show up across the router, browser API, and local clone-backed repository state.

Add Playwright coverage for no-ref default route replacement, user ref selection route updates, and mounted same-branch navigation with a different requested SHA so future changes cannot regress these route/data-flow boundaries while component tests still pass.

Validation: cd frontend && ../node_modules/.bin/vp exec -- playwright test --config=playwright-e2e.config.ts repo-browser.spec.ts --project=chromium --project=firefox; ./node_modules/.bin/vp run frontend-check; cd frontend && ../node_modules/.bin/vp test run --project unit.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repository markdown previews reused Docs/Kata short-id autolinks, so numeric references such as #123 rendered as inert Kata links instead of navigating to the repository issue or PR.

Thread the selected repository identity into the docs markdown renderer and reuse the shared provider item-reference renderer for repo previews. Docs mode keeps Kata short-id behavior because the provider item extension is only installed when a repo context is present.

Validation: cd frontend && ../node_modules/.bin/vp test run --project unit src/lib/api/docs/markdown.test.ts src/lib/features/repo-browser/RepoBrowserFeature.test.ts; ./node_modules/.bin/vp exec svelte-mcp svelte-autofixer frontend/src/lib/features/repo-browser/RepoBrowserFeature.svelte.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The GitHub App E2E browser helper reported success before the fake browser had finished following the manifest callback redirect. CI could close the local callback server while that final request was still in flight, producing intermittent connection-refused failures in unrelated tests.

Keep the helper synchronous so openBrowser only returns after the scripted browser work is complete, and surface helper failures through runCLI instead of detached goroutine assertions.

Validation: go test ./cmd/middleman-github-app -run TestListFlagsSelectedInstallMissingRepos -shuffle=on; go test ./cmd/middleman-github-app -shuffle=on.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Repository previews reuse provider item reference parsing, but raw HTML/code blocks need the same tokenizer guard as Kata links. Without it, contributor markdown such as <code>#12</code> could be rewritten into a generated provider item anchor.

Add the regression at the docs markdown boundary because repo previews call through that renderer with repo context.

Validation: cd frontend && ../node_modules/.bin/vp test run --project unit src/lib/api/docs/markdown.test.ts -t 'does not turn repo references inside raw code'; cd frontend && ../node_modules/.bin/vp test run --project unit src/lib/api/docs/markdown.test.ts ../packages/ui/src/utils/markdown.test.ts src/lib/features/repo-browser/RepoBrowserFeature.test.ts; ./node_modules/.bin/vp run frontend-check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@mariusvniekerk mariusvniekerk merged commit f9d5f8b into main Jun 25, 2026
10 checks passed
@mariusvniekerk mariusvniekerk deleted the repo-browser-main-ui branch June 25, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant