Skip to content

OpenConceptLab/ocl_online#418 | Unified navigation: shared tray, + menu and Mapping Projects profile tab - #89

Merged
paynejd merged 14 commits into
mainfrom
ocl_online#418
Oct 30, 2026
Merged

paynejd merged 14 commits into
mainfrom
ocl_online#418

Conversation

@snyaggarwal

@snyaggarwal snyaggarwal commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Part of OpenConceptLab/ocl_online#418, following the design revision on the ticket.

  • Removes the TBv2 button
  • Adds Mapping project to the + menu (after Repository, before Bulk import)
  • Tray: My Mapping Projects opens the new map-projects profile tab; the Create link beside My Organizations now works
  • User and org profiles get a Mapping Projects tab, plus a ProfileTabs slot for the private package
  • MAPPER_URL config; unset on a non-openconceptlab.org host hides the Mapper items

Sibling PRs: OpenConceptLab/oclmap#122, https://github.com/OpenConceptLab/ocl-community-site/pull/213

🤖 Generated with Claude Code

@snyaggarwal

snyaggarwal commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated review after Jon's revised unified-navigation design on OpenConceptLab/ocl_online#418.

Correction: I withdraw the earlier app-switcher/one-click finding. Sending My Mapping Projects to the TermBrowser profile tab, naming work rather than apps, and omitting a direct Community item are intentional in the revised design.

Remaining findings — request changes:

  1. MapProjects.jsx:23-31 fetches only /:ownerType/:owner/map-projects/. For a user, the current Mapper list also fetches /users/:user/orgs/map-projects/; without that second request, My Mapping Projects drops projects owned by the user's organizations. The revised design explicitly identifies both endpoints as the data behind the new profile tab.
  2. The revised tray requires repository and mapping-project counts. LeftMenu.jsx:97-105 renders the repository count but no Mapping Projects count (it renders only the existing waitlist chip), so the two trays do not yet match the approved mock.
  3. Please add regression coverage for the combined user + organization project list, the Mapping Projects count, and configured/official/unconfigured Mapper URL behavior. The graph currently finds no tests for getMapperURL, trayItems, useProfileTabs, or MapProjects.

The corrected cross-repo review is on OpenConceptLab/ocl_online#418.

…counts, selection, configurable URLs, tests
@snyaggarwal

Copy link
Copy Markdown
Contributor Author

Addressed the review in 53657dc: the Mapping Projects tab now lists user and organization projects (deduplicated), the tray shows the Mapping Projects count, the tray highlights Mapping Projects on nested paths, and tests cover Mapper URL resolution (configured, official host, localhost, custom host), project merging, counts and tray items. An unconfigured custom host resolves to the production Mapper, as intended.

@snyaggarwal

Copy link
Copy Markdown
Contributor Author

Final review — DO NOT MERGE (53657dc)

The follow-up commit resolves the earlier project-list, count, selection and test-coverage findings. CI is green, and the local suite passes (83 tests plus ESLint).

One release blocker remains: resolveMapperURL() deliberately returns https://map.openconceptlab.org for localhost, an unconfigured custom host, or a missing origin. That makes hasMapper() true everywhere, so an ordinary custom/self-hosted TermBrowser advertises Mapping Projects and can send its local project paths to the production Mapper.

Jon's revised design says the opposite: when the Mapper URL is set, the integrated items show; when it is unset, TermBrowser runs alone and hides them. Only a recognized openconceptlab.org app host gets the temporary hostname fallback. This is also required by the open-core rule that optional hosted connections are off until configured.

Change the unrecognized/unconfigured fallback to no Mapper (''), keep the configured and recognized-official-host behavior, and update the tests that currently enshrine the production fallback. With that change and green checks, I recommend merge.

@snyaggarwal

Copy link
Copy Markdown
Contributor Author

Addressed the final review in e10a4e5: the Mapper URL now resolves only from configuration or a recognized openconceptlab.org app host; otherwise there is no Mapper and the Mapper-dependent items stay hidden. Tests updated.

@snyaggarwal

Copy link
Copy Markdown
Contributor Author

Final review — round 2

Recommendation: MERGE once the PR is marked ready.

Reviewed head e10a4e5 against the revised unified-tray design. The prior blocker is resolved: an unconfigured custom/self-hosted Term Browser no longer invents a production Mapper connection, while configured and recognized OCL deployments retain the intended integration.

Validation:

  • Local test suite: 83/83 passed
  • ESLint: passed
  • GitHub PR checks and Snyk: passed

No remaining blocking findings in this PR.

(Final review round 2)

@snyaggarwal
snyaggarwal marked this pull request as ready for review October 30, 2026 06:00
paynejd and others added 10 commits October 30, 2026 10:59
…e owner, the organization's members and staff

Mapping projects are private. Someone else's profile, or an organization
you don't belong to, no longer gets the tab; a direct link to it shows
Overview. Staff see it on every profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ab filters its list

The search drawer's owner option used to send the Mapping Projects tab to
a broken address. It now stays on the tab, which loads every page of the
owner's projects and filters them by name and ID; a chip shows the term
and clears it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the owner's repositories or mapping projects

On a user or organization profile the drawer said "Search jon map-projects"
or "Search jon repos", with the hint "Search this repository". It now
reads "Search jon's repositories for ..." (Overview and Repositories) or
"Search jon's mapping projects for ..." (Mapping Projects), with a
matching hint. Repository pages keep "Search this repository".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Summary panel on user and organization profiles shows "N mapping
projects", linking to the tab, wherever that tab shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…CL Community website

The community site was reachable only from the profile menu. The left
tray now ends with an "OCL Community website" link, and the footer shows
it beside Terms of Use and Privacy Policy. All three use one constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ranslated in Spanish and Chinese

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the rows in repository lists

In tables with medium rows (a user's Repositories tab), the header's
padding pushed the select-all box about 12px right of the row boxes.
Small tables (concepts, mappings, search) were already aligned and keep
their padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ilters only when the list has room

On user and organization profiles the list shares its width with the
summary panel, so the filter panel opened on any 1200px window and
squeezed the table. Profiles now measure the list itself and open the
panel by default only when it is at least 1000px wide. On profiles and
repository pages, the panel follows the window as it is resized until the
person opens or closes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ldn't load, with Try again, instead of showing a partial list

The community-site link constant moves below PRIVACY_POLICY_URL, away from
the lines the banner PR (oclweb3#88) removes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…PER_URL to localhost:4004, so a self-hosted TBv3 shows no Mapper links until one is configured

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paynejd

paynejd commented Oct 30, 2026

Copy link
Copy Markdown
Member

Codex review, pass 1 (codex-cli 0.166.0, commit 7e8f964)

Verdict: findings: 1 P1, 1 P2.

  • F1.1 (P1) src/components/map-projects/MapProjects.jsx:27: Failed page requests silently produce an apparently complete empty or partial project list. Response: Fixed in d2d2740: fetchAllPages (now in src/common/mapProjects.js) rejects when any page fails, and the tab shows "Could not load mapping projects." with Try again. Unit tests added. A failed count request still reads 0; recorded as P3.
  • F1.2 (P2) src/components/map-projects/MapProjects.jsx:28: The 20-page cutoff violates A3's requirement to load every page. Response: Accepted, not fixed: the cap is 2,000 projects per owner list, far above any owner today.
findings.json
{
 "reviewer": "codex-cli 0.166.0",
 "perspective": "defects",
 "mode": "full",
 "commit": "7e8f964e471731102ec0c93654ae4dabba932756",
 "verdict": "findings",
 "prior": [],
 "findings": [
  {
   "id": "F1.1",
   "severity": "P1",
   "tag": null,
   "file": "src/components/map-projects/MapProjects.jsx",
   "line": 27,
   "claim": "Failed page requests silently produce an apparently complete empty or partial project list.",
   "scenario": "An owner has 150 projects and page 2 returns HTTP 500. APIService resolves failures rather than rejecting, so this code treats the response as an empty final page and displays only the first 100 projects. Searching for a project on page 2 falsely reports no results. A first-page failure instead displays 'No mapping projects yet.'",
   "action": "Validate each response before accepting its data. Surface a loading failure or incomplete-list state with retry instead of presenting failed requests as successful empty pages; apply equivalent validation to project counts.",
   "lines_delta": null,
   "confidence": "high"
  },
  {
   "id": "F1.2",
   "severity": "P2",
   "tag": null,
   "file": "src/components/map-projects/MapProjects.jsx",
   "line": 28,
   "claim": "The 20-page cutoff violates A3's requirement to load every page.",
   "scenario": "A user or organization endpoint contains 2,001 projects. Loading stops after 2,000 despite the API returning a next-page header. The remaining project cannot appear in the list or its client-side search, and there is no pagination control to reach it.",
   "action": "Continue until the API has no next page. If a protective cutoff is necessary, expose an explicit continuation mechanism and avoid presenting truncated search results as complete.",
   "lines_delta": null,
   "confidence": "high"
  }
 ]
}

Codex review, pass 2 (codex-cli 0.166.0, commit dbcfeda)

Verdict: clean. F1.1 resolved; F1.2 stands as accepted. Also reviewed: dbcfeda (docker-compose's MAPPER_URL default is now empty) and COMMUNITY_SITE_URL's move in constants.js.

findings.json
{
 "reviewer": "codex-cli 0.166.0",
 "perspective": "defects",
 "mode": "verify",
 "commit": "dbcfedaaa26d5e6d0a70d72038d6eba32af06a6e",
 "verdict": "clean",
 "prior": [
  {
   "id": "F1.1",
   "status": "resolved"
  },
  {
   "id": "F1.2",
   "status": "unresolved"
  }
 ],
 "findings": []
}

…and the count hook get shorter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paynejd

paynejd commented Oct 30, 2026

Copy link
Copy Markdown
Member

Simplification review (Claude subagent, commit dbcfeda)

9 suggestions. Applied in 8aa83e3: S1 and S2 (mergeProjects is a flat dedupe; its non-list guard and test go) and S4 (the count hook builds its requests like the tab does). Declined for today's deploy:

  • S3 (drop the plugin-tab promise cache): it touches the plugin loader; not needed for this change.
  • S5 (shared tray sx constants): it restyles the main tray render; follow-up.
  • S6 (one shared summary-count component): it touches two files; follow-up.
  • S7 (shared message row): two rows; no clearer.
  • S8 and S9 (navigation test and file): these must stay byte-identical across oclweb3, oclmap and ocl-community-site.

Codex check of commits dbcfeda..8aa83e3 (codex-cli 0.166.0)

Verdict: clean.

findings.json
{"reviewer":"codex-cli 0.166.0","perspective":"defects","mode":"final","commit":"8aa83e3b42e79e5ca5f6b93205d85a10faeafca0","verdict":"clean","prior":[],"findings":[]}

@paynejd paynejd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved after the takeover review: Codex clean (2 passes + final check), simplification review applied, CI green. OpenConceptLab/ocl_online#418

@paynejd
paynejd merged commit dcdab0a into main Oct 30, 2026
2 checks passed
@paynejd
paynejd deleted the ocl_online#418 branch October 30, 2026 17:52
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