Repository navigation
OpenConceptLab/ocl_issues#2947 | Pins move to the repo Actions menu; no pin or follow controls in lists - #73
Conversation
There was a problem hiding this comment.
Codex review, pass 1 (codex-cli 0.163.0, commit de4f258)
Verdict: clean. No findings.
findings.json
{
"reviewer": "codex-cli 0.163.0",
"perspective": "defects",
"mode": "full",
"commit": "de4f2581",
"verdict": "clean",
"prior": [],
"findings": []
}
paynejd
left a comment
There was a problem hiding this comment.
Simplification review (fresh Claude subagent, commit de4f258)
Verdict: one proposed cut.
- S1 (shrink,
RepoHeader.jsxL36): dropcanPinfrom thepinprop, sinceusePinsgets an owner only whencanActOnPinsis true. Declined:pinsis state thatusePinsresets only in an effect, so in the render where the owner stops being pinnable the old list is still there;canPinis computed in that render and keeps the item hidden. It costs one line.
No code changed after Codex pass 1, so there is no follow-up Codex check.
simplify.json
{"reviewer":"claude subagent","perspective":"simplify","mode":"full","commit":"de4f258174e83fadb2a9913480e6cbfc7e01902f","verdict":"findings","prior":[],"findings":[{"id":"S1","severity":null,"tag":"shrink","file":"src/components/repos/RepoHeader.jsx","line":36,"claim":"The `canPin` check in the pin prop is redundant: usePins is only given an owner when canActOnPins(pinOwner) is true, so canPin is true whenever pins can be non-false (pins stays false when owner is false).","action":"Destructure `{ pins, findPin, togglePin }` and pass `pin={pins !== false ? {owner: pinOwner.id, pinned} : false}`.","lines_delta":-1,"confidence":"medium"}]}
paynejd
left a comment
There was a problem hiding this comment.
Codex check of commits de4f258..17c2c86 (codex-cli 0.163.0, commit 17c2c86)
Asked only whether 17c2c86 (search bar browse lists show follows; includePins and the search.bookmarked_* strings dropped) broke anything. Verdict: clean. No findings.
findings.json
{"reviewer":"codex-cli 0.163.0","perspective":"defects","mode":"cuts","commit":"17c2c864","verdict":"clean","prior":[],"findings":[]}… menu; lists and hover cards lose pin and follow controls - Repo Actions menu: "Pin to <owner> overview" / "Unpin from <owner> overview" for the owning user, the org's members and staff, also from a version page (it pins the repo). - Search results (global search, org and user repository lists) no longer have a pin column; PinActionButton is gone. - Repo, org and user hover cards no longer have a Follow button. Follow stays on org, repo and user pages. - At the 4-pin limit the error says to remove a pin from the owner's overview first, also when only the API knows the limit is reached. - The who-can-pin rule moves to src/common/pins.js, with unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph
…, not the user's pins The organization, repository and user browse lists in the search bar had a "Bookmarked" section read from the signed-in user's pins, next to the existing "Following" section. Pins are now overview highlights, so the Bookmarked sections go and the lists show what the user follows. Nothing else reads the user's pins from /user/, so the cache refresh no longer asks for includePins, and the three search.bookmarked_* strings are removed from all four locales. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph
|
Rebased onto |
17c2c86 to
867d75e
Compare
In TBv3 a pin is what an org or user highlights on its own overview page, and a follow is a personal shortcut listed in the left menu. This PR does the web part of the ticket; the data migration that turns TBv2 pins into follows is a separate oclapi2 PR.
What changed
PinActionButtonwas used only there, so it's deleted./in the search bar) drop their "Bookmarked" section, which read the signed-in user's own pins. They keep "My …" and "Following …", so personal shortcuts there are follows. Nothing else reads the cached user's pins, so the/user/refresh no longer asks forincludePins.canActOnPins) moves into a small pure module,src/common/pins.js, with unit tests. Its behaviour is unchanged.No new UI component: the menu item reuses the existing Actions menu item pattern and
PinIcon.Verification
npm testpass; 6 new tests insrc/common/__tests__/pins.test.js.{error}for the API-side limit). Results:DELETE /orgs/CIEL/pins/20/and the item turns into "Pin to CIEL overview". Pinning then sendsPOST /orgs/CIEL/pins/ {"resource_type":"Source","resource_id":"42"}(the repo's id, also from a version page), and the item turns back.Limit message:

Org repository list, no pin column:

Repo hover card, no Follow:

The
screenshots/ocl_issues-2947branch holds only these images and can be deleted after review.Strings
New or changed keys under
bookmarksin all four locales:pin_to_owner_overview,unpin_from_owner_overview,pinned_to_owner_overview,unpinned_from_owner_overview, andmax_pins_reached(new text, now with{{max}}and{{owner}}).bookmarks.pinwas used only by the removed list button, andsearch.bookmarked_organizations,search.bookmarked_repositoriesandsearch.bookmarked_usersonly by the removed browse sections, so they're deleted. The browse lists reuse the existingsearch.following_*titles.pt-BR, for Filipe's review:
pin_to_owner_overview: "Fixar na visão geral de {{owner}}"unpin_from_owner_overview: "Remover fixação da visão geral de {{owner}}"pinned_to_owner_overview: "Fixado na visão geral de {{owner}}"unpinned_from_owner_overview: "Fixação removida da visão geral de {{owner}}"max_pins_reached: "Você pode fixar até {{max}} repositórios. Remova primeiro uma fixação da visão geral de {{owner}}."closes OpenConceptLab/ocl_issues#2947
🤖 Generated with Claude Code
https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph