Skip to content

OpenConceptLab/ocl_issues#3039 | Restore the "View in TBv2" chip - #103

Open
paynejd wants to merge 3 commits into
mainfrom
OpenConceptLab/ocl_issues#3039-view-in-tbv2
Open

paynejd wants to merge 3 commits into
mainfrom
OpenConceptLab/ocl_issues#3039-view-in-tbv2

Conversation

@paynejd

@paynejd paynejd commented Nov 16, 2026

Copy link
Copy Markdown
Member

Restores TBv3's "View in TBv2" chip (closes OpenConceptLab/ocl_issues#3039). It was removed with the unified navigation in #89; TBv2's "View in TBv3" chip still works, so people could go from TBv2 to TBv3 but not back.

What changed from the removed version

  • Target: TBv2 at app.v2.<env> instead of app.<env>, so the link keeps working once TBv3 serves app.<env>.
  • Config: a TBV2_URL setting, wired like MAPPER_URL, overrides it. Deployments outside openconceptlab.org show no chip unless it's set, rather than linking to OCL's production TBv2.
  • Paths: the mapping moved to appUrls.js with unit tests. It now carries versioned expansions across and drops tabs or resources TBv2 doesn't have (summary, unversioned expansions, references/:id).
  • Layout: the header's right column has no room on a phone once + is there, so the chip is hidden below sm, shows only its logo below md, and shows "View in TBv2" from md up. The tooltip carries the label throughout.

Checked

  • eslint and npm test as in pr.yml (153 pass).
  • Local TBv3 with TBV2_URL: chip links from 8 pages (concept, source about and versions, collection version references, versioned expansion concepts, collection summary, org URL registry, search) all landed on the matching page on production TBv2.
  • Header measured at 375, 599, 600, 768, 899, 900 and 1280 px: no wrap, with room for the signed-in + button.

Deploy: nothing to set for openconceptlab.org environments.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AaZ4qX4xy8MVN45s1UuhFt

paynejd and others added 2 commits November 16, 2026 14:43
The chip came out with the unified navigation (OpenConceptLab/ocl_online#418).
It now links to TBv2 at app.v2.<env>, which keeps working once TBv3 serves
app.<env>, or to a configured TBV2_URL; other deployments show no chip. The
path mapping moved to appUrls.js with tests, and also carries versioned
expansions across. Phones hide the chip and medium widths show only its logo,
so the header doesn't wrap beside + and the account button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qX4xy8MVN45s1UuhFt
…ing HEAD in TBv2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qX4xy8MVN45s1UuhFt
@paynejd

paynejd commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Codex review, pass 1 (codex-cli 0.169.0, commit ff84b8e)

Verdict: findings, 1 finding(s).

  • F1.1 (P1) src/common/appUrls.js:84: Expansion links without an explicit version lose their selected expansion. Response: Fixed in ead9b7c: an expansion without a version now maps to HEAD/expansions/, as the removed version did (checked live on TBv2), with tests.
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "full",
  "commit": "ff84b8e5",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "F1.1",
      "severity": "P1",
      "tag": null,
      "file": "src/common/appUrls.js",
      "line": 84,
      "claim": "Expansion links without an explicit version lose their selected expansion.",
      "scenario": "TBv3 supports /orgs/o/collections/c/expansions/e1/concepts/1066 for an implicit HEAD collection. This maps to /orgs/o/collections/c/concepts/1066, opening the default expansion instead of e1 and potentially losing the selected concept. TBv2 can represent the same page at /orgs/o/collections/c/HEAD/expansions/e1/concepts/1066.",
      "action": "Insert HEAD when preserving an expansion without an explicit version, as the removed implementation did. Update the test that currently expects the expansion to be discarded.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Codex review, pass 2 (codex-cli 0.169.0, commit ead9b7c)

Verdict: clean, no findings.

  • F1.1: resolved
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "verify",
  "commit": "ead9b7c2",
  "verdict": "clean",
  "prior": [
    {
      "id": "F1.1",
      "status": "resolved"
    }
  ],
  "findings": []
}

… props MUI already supplies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qX4xy8MVN45s1UuhFt
@paynejd

paynejd commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Simplification review (Claude subagent, Sonnet 5.5, commit ead9b7c)

Verdict: findings, 3 finding(s).

  • S1 (None) src/components/common/ClassicOCLLogo.jsx:337: The size prop has no caller. ClassicTermBrowserButton renders with no props, so the size || 18 fallback and the props destructuring are unused flexibility. Response: Applied in aace199.
  • S2 (None) src/components/app/ClassicTermBrowserButton.jsx:274: size='medium' is MUI Chip's default, so it does nothing. Response: Applied in aace199.
  • S3 (None) src/components/app/ClassicTermBrowserButton.jsx:279: The explicit aria-label repeats what MUI Tooltip already does. When title is a string, Tooltip sets aria-label on its child to that title, and here the title is the same translation key. Response: Applied in aace199; checked that MUI Tooltip sets aria-label from a string title (Tooltip.js), and the chip still has it in the browser.
findings.json
{
  "reviewer": "claude subagent",
  "perspective": "simplify",
  "mode": "full",
  "commit": "ead9b7c2",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "S1",
      "severity": null,
      "tag": "yagni",
      "file": "src/components/common/ClassicOCLLogo.jsx",
      "line": 337,
      "claim": "The `size` prop has no caller. ClassicTermBrowserButton renders <ClassicOCLLogo /> with no props, so the `size || 18` fallback and the props destructuring are unused flexibility.",
      "action": "Drop the prop and hard-code `width={18} height={18}`: `const ClassicOCLLogo = () => (<img src={CLASSIC_LOGO} alt='' width={18} height={18} style={{display: 'block', borderRadius: '3px'}} />);`",
      "lines_delta": -1,
      "confidence": "high",
      "scenario": null
    },
    {
      "id": "S2",
      "severity": null,
      "tag": "delete",
      "file": "src/components/app/ClassicTermBrowserButton.jsx",
      "line": 274,
      "claim": "`size='medium'` is MUI Chip's default, so it does nothing.",
      "action": "Nothing replaces it.",
      "lines_delta": -1,
      "confidence": "high",
      "scenario": null
    },
    {
      "id": "S3",
      "severity": null,
      "tag": "native",
      "file": "src/components/app/ClassicTermBrowserButton.jsx",
      "line": 279,
      "claim": "The explicit `aria-label` repeats what MUI Tooltip already does. When `title` is a string, Tooltip sets `aria-label` on its child to that title, and here the title is the same translation key.",
      "action": "Remove the `aria-label` prop and let Tooltip supply it.",
      "lines_delta": -1,
      "confidence": "medium",
      "scenario": null
    }
  ]
}

@paynejd

paynejd commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits ead9b7c..aace199 (codex-cli 0.169.0)

Verdict: clean, no findings.

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

@paynejd

paynejd commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

@snyaggarwal This brings back the TBv2 cross-link in the header in TBv3. Please merge and deploy if it looks good.

This branch has not been deployed

No deployments
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.

TBv3: restore the "View in TBv2" link

2 participants