Repository navigation
fix: use configured branch in repository browse - #2348
Conversation
|
/review fable |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — fableOverall EvaluationThis PR fixes a real bug: the Browse tab was calling ✅ Fallback behavior preserved — ✅ Effect and callback dependencies updated correctly — ✅ Branch value is URL-encoded — Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Propagate branch to
|
|
Codex review: The fix is sound, but branch identity still isn’t carried through the whole browsing experience. At 849f35d, I found three concrete gaps:
Two broader follow-ups would make this more durable:
I’d add component regressions for notification navigation, repository/branch switching with delayed responses, and GitHub link targets. The new URL tests don’t exercise those paths. |
…sistent routing, exact source-SHA preservation, contributor attribution, and destination-aware comments. Final-push denial publishes the existing implementation commits. Original PRs remain open. Implemented permission-based continuation handling with persistent routing, exact source-SHA preservation, contributor attribution, and destination-aware comments. Final-push denial publishes the existing implementation commits. Original PRs remain open. Validation passed: build, typecheck, focused ESLint, and 55 tests. Live Git dry runs succeeded for #2348 and #2393 using the worker-provided installation token. Changes are uncommitted. No PR or preview files were created. PR: #2393 Comment by: @integry (ID: 5661663400) Model: gpt-6-astra
849f35d to
3c89720
Compare
|
/review fable codex |
|
✅ AI Code Review Complete requested by @integry Posted 2 reviews: |
🔍 AI Code Review — fableOverall EvaluationThis PR threads branch identity through the Summary Browser end to end: the Repositories workspace passes ✅ Scope isolation is actually enforced, not just remounted — ✅ Single resolution rule shared by all entry points — ✅ GitHub link hardening beyond the objective — I found no PR-introduced correctness regression in the changed code. However, the current head reports a failed Validate Changes check that I cannot trace to a specific changed line from the diff alone, so the PR cannot be called merge-ready until that is resolved. Verdict: needs minor changes (resolve/explain the failing check). Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Investigate the failed Validate Changes checkThe head has one failing check while S2: 🟢 Verify GitHub accepts a percent-encoded slash in the ref segment
S3: 🟢 Standalone page can hang behind the catalog fetch
S4: 🟢 Share the indexing deep-link builder across server and UI
S5: 🟢 Simplify
|
🔍 AI Code Review — codexOverall EvaluationThe PR substantially completes branch propagation and browser-state isolation, but needs a localized correction before merge. The current Validate Changes check also fails; the supplied evidence does not establish its cause. ✅ Consistent API propagation — Status, directory, path-summary, and recursive tree requests receive URL-encoded branch parameters. ✅ Scope isolation — Repository/branch changes clear browser state, and generation checks reject stale root and expanded-child responses. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Preserve branch identity in voice links
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise recursive branch propagationThe new ScoreThe implementation and focused regressions address most of the objective, but voice links still alter some branch names. That localized correctness issue and the current failed validation check prevent merge readiness. Score: 6/10 🤖 Review Details
🤖 Review by ProPR |
|
/fix |
|
✅ Applied the requested follow-up changes in commit 476f0e6
Summary of ChangesF1 is applied and verified. The fix is a backend link-encoding change, so it isn't visually perceptible and no preview files were created. Per the instructions, I did not commit — changes are left in the working tree. What changed:
Verification: all 10 tests in Nothing beyond F1 was touched — the inbox and push paths already encoded correctly and were left as-is. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ing change, so it isn't visually perceptible and no preview files were created. Per the instructions, I did not commit — changes are left in the working tree. F1 is applied and verified. The fix is a backend link-encoding change, so it isn't visually perceptible and no preview files were created. Per the instructions, I did not commit — changes are left in the working tree. **What changed:** 1. `packages/api/services/voiceBriefingService.ts:432` — the indexing-notification voice link now builds the branch query with `encodeURIComponent(target.branch)` instead of `safePathSegment(target.branch)`. The old helper routed the branch through `boundedText`, which collapses Unicode whitespace (e.g. internal U+00A0) into ordinary spaces, so the link pointed at a different branch. The new call matches the push implementation in `webPushDispatcher.ts:278` exactly. 2. `packages/api/test/voiceBriefingService.test.ts` — added a regression test that feeds an indexing notification with branch `feature/a\u00a0b` (internal no-break space, written as an explicit escape so it's visible to reviewers) and asserts the resulting href is `/summaries/integry/propr?branch=feature%2Fa%C2%A0b`, preserving the character. **Verification:** all 10 tests in `voiceBriefingService.test.ts` pass (including the new one), `tsc --noEmit` for `@propr/api` is clean, eslint on both changed files reports nothing, and `git diff --check` passes. Nothing beyond F1 was touched — the inbox and push paths already encoded correctly and were left as-is. PR: integry#2348 Comment by: @integry (ID: 5695369821) Model: claude-fable-5
|
/review codex |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codexOverall EvaluationThe PR substantially completes branch propagation and browser-state isolation, but needs minor changes because normalization can alter valid branch names. Current checks report 18 passed, six pending, seven neutral/skipped, and no failures. ✅ Consistent API propagation — Branch arguments reach status, directory, path-summary, and recursive tree requests. ✅ Scope isolation — Repository/branch changes clear cached state, while generation checks reject stale root and expanded-directory responses. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F2: 🔴 Preserve valid Unicode branch characters
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Test branch-only scope changesThe new race tests change both repository owner and branch, and resolve the old status request before switching. Adding a same-repository branch switch and a genuinely late status response would independently protect those cases. The implementation already includes the relevant dependencies and guards, so these additional tests are optional. ScoreThe implementation is focused and has useful regression coverage, but the branch-identity defect needs correction before merge. Pending checks alone do not cap the score. Score: 6/10 🤖 Review Details
🤖 Review by ProPR |
|
/fix |
|
✅ Applied the requested follow-up changes in commit 1c60e6f
Summary of ChangesF2 is applied and verified. The fix restricts branch whitespace normalization in What changed:
Verification: the summaryBrowser vitest file passes (4 tests, including the new regression), This is a string-normalization fix with no visually perceptible effect, so no preview files were created. Per the instructions, I did not commit — the changes are left in the working tree. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…pace normalization in `propr-ui/src/utils/summaryBrowser.ts` to ASCII whitespace only, so valid Unicode branch characters like a trailing nonbreaking space now survive branch resolution, API queries, and link generation. F2 is applied and verified. The fix restricts branch whitespace normalization in `propr-ui/src/utils/summaryBrowser.ts` to ASCII whitespace only, so valid Unicode branch characters like a trailing nonbreaking space now survive branch resolution, API queries, and link generation. What changed: - `normalizeSummaryBranch` no longer uses `String.prototype.trim()` (which strips Unicode whitespace, including U+00A0). It now strips only the ASCII whitespace characters Git actually forbids in refs (space, tab, LF, CR, FF, VT) from the ends of the string, via a small `ASCII_WHITESPACE_EDGES` regex with a comment explaining the constraint. A branch like `feature/a\u00a0` is preserved exactly, so `?branch=feature%2Fa%C2%A0` resolves to the real branch instead of `feature/a`. - Added the requested regression in `propr-ui/src/utils/summaryBrowser.test.ts`: a trailing nonbreaking space is preserved through `resolveSummaryBranch` (both explicit and configured branch paths, including mixed ASCII padding like `'\tfeature/a\u00a0\n'` normalizing to `feature/a\u00a0`) and through `summaryBrowserPath` link generation, which must emit `%C2%A0` in the URL. Verification: the summaryBrowser vitest file passes (4 tests, including the new regression), `tsc --noEmit` for propr-ui passes, and eslint on both changed files reports no issues. The remaining `.trim()` call sites in the repo touch other inputs (prompts, the repository-management baseBranch form) and are outside F2's scope, so I left them untouched. This is a string-normalization fix with no visually perceptible effect, so no preview files were created. Per the instructions, I did not commit — the changes are left in the working tree. PR: integry#2348 Comment by: @integry (ID: 5695566443) Model: claude-fable-5
|
/review codex |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codexOverall EvaluationThe PR implements branch-aware browsing with focused API, navigation, and state-management changes. It needs minor changes before merge because explicit notification actions can still lose the indexed branch. ✅ Consistent API propagation — Status, directory, path-summary, and recursive tree requests carry the encoded branch. ✅ Scope isolation — Repository/branch changes clear browser state, and generation checks reject stale root and child responses. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Preserve branches in explicit Browse actions
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Cover branch-only and late-status transitionsThe scope tests change repository and branch together. Also, the test named “ignores late status and root responses” resolves the old status before switching, so it exercises only a late root response. A same-repository branch switch with an outstanding status request would strengthen coverage. This is optional because the implemented generation checks already appear to handle those transitions. ScoreThe core browsing implementation is sound, but notification branch preservation remains incomplete for explicit Browse actions. The supplied current checks show no failures, with six pending. Score: 6/10 🤖 Review Details
🤖 Review by ProPR |
|
/fix |
|
✅ Applied the requested follow-up changes in commit 3506700
Summary of ChangesF3 is applied and verified. Explicit Browse navigate actions on indexing notifications now carry the notification's branch instead of falling back to the configured branch. What changed
The finding's failure scenario — a notification targeting Regression tests added
Verification — new dispatcher suite: 20/20 passed (SQLite-backed, ran fine in this container); full propr-ui vitest: 1090/1090 passed; No preview files were created: the change only alters link query strings, so nothing is visually perceptible — matching the precedent set for F1. Changes are left uncommitted for the system to commit. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…s on indexing notifications now carry the notification's branch instead of falling back to the configured branch. F3 is applied and verified. Explicit Browse navigate actions on indexing notifications now carry the notification's branch instead of falling back to the configured branch. **What changed** - `propr-ui/src/utils/summaryBrowser.ts` — added `summaryHrefWithBranch(href, repository, branch)`: when an application-relative href points at the target repository's `/summaries/:owner/:repo` page and has no `branch` query, it appends the encoded branch. Explicit `?branch=` queries, other query parameters, hashes, and unrelated links pass through unchanged. - `propr-ui/src/pages/inboxUtils.ts` — `notificationHref` now routes indexing-notification navigate actions through that helper, so Inbox links preserve the branch even when the server supplied a branchless action; previously the action href bypassed the branch entirely. - `packages/api/services/webPushDispatcher.ts` — added an equivalent `navigateHrefWithTargetBranch` helper and threaded the notification target into `notificationActionUrl`, so both the push deep link and the "View details" action URL append the target branch to branchless summary-page actions before resolving against the frontend URL (frontend base params such as `tenant` are still merged). The finding's failure scenario — a notification targeting `release/2026` with action `/summaries/integry/propr` — now opens `?branch=release%2F2026` in all three link kinds. Voice links were untouched, since they use only the fallback path F3 didn't flag. **Regression tests added** - `inboxUtils.test.ts`: branchless action gains the branch; an explicit `?branch=feature%2Fui` action wins over the target branch; a `/repositories` action is untouched. - `summaryBrowser.test.ts`: unit coverage of the helper, including other-parameter preservation and non-matching repositories. - `webPushDispatcher.test.ts`: an indexing event with a branchless navigate action produces a deep link and action URL with `branch=release/2026` while keeping the `tenant` base param. **Verification** — new dispatcher suite: 20/20 passed (SQLite-backed, ran fine in this container); full propr-ui vitest: 1090/1090 passed; `tsc --noEmit` and eslint clean for both packages on the changed files; `git diff --check` clean. No preview files were created: the change only alters link query strings, so nothing is visually perceptible — matching the precedent set for F1. Changes are left uncommitted for the system to commit. PR: integry#2348 Comment by: @integry (ID: 5695913077) Model: claude-fable-5
|
/review codex |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codexOverall EvaluationThe PR consistently carries branch identity through browsing, summary requests, notification links, and GitHub links. It is ready to merge within scope, conditional on the remaining checks passing. ✅ Branch precedence — Standalone browsing resolves explicit branches before configured branches and preserves the legacy fallback when neither resolves. ✅ Scope isolation — Repository and branch changes reset browser state; generation checks reject stale root and expanded-directory responses. ✅ Branch propagation — All four summary API helpers forward encoded branches, including recursive tree requests. Inbox and web-push actions preserve existing explicit branch queries. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Test branch-only scope changesThe scope-isolation tests change both repository and branch together. Add a case that changes only the branch and resolves the previous branch’s status afterward. This would protect the branch dependency and stale-status guard independently; the current implementation already includes both protections, so this is optional. S2: 🟢 Exercise recursive branch propagationThe ScoreThe implementation addresses the objective with focused regression coverage and no verified merge blockers. Current checks report 13 passed, 10 pending, 7 neutral/skipped, and no failures. Score: 9/10 🤖 Review Details
🤖 Review by ProPR |
Summary
Rebuilt the original Repository Browse branch fix on current
origin/mainand completed branch identity handling across repository Browse, standalone summary routes, notification links, summary API requests, and GitHub file links.Branch behavior
Browse resolves its branch as: explicit
?branch=request, then configured repositorybaseBranch, then the existing API/GitHubHEADfallback when neither is available. Branches are URL-encoded in API queries and navigation links.Changes
/summaries/:owner/:reporouteOpen on GitHubuse the displayed branch, with legacyHEADonly when no branch resolvesValidation
git diff --checkpassedThe server notification integration tests were not executed because this task explicitly prohibits touching SQLite or Redis.