Skip to content

OpenConceptLab/ocl_online#327 | "View in TBv3" goes to app.<env>, not app.v3.<env> - #66

Merged
snyaggarwal merged 2 commits into
masterfrom
ocl_online-327-tbv3-link-app
Dec 1, 2026
Merged

snyaggarwal merged 2 commits into
masterfrom
ocl_online-327-tbv3-link-app

Conversation

@snyaggarwal

Copy link
Copy Markdown
Contributor

TBv3 is now the default Term Browser at app.<env>, and app.v3.<env> only redirects there (302). TBv2's "View in TBv3" chip still built app.v3.<env> links, so every click took a redirect hop.

Change

  • New toTBv3Origin (src/common/env.js):
    • On app.v2[.<env>] (or app[.<env>]), it returns app[.<env>].
    • On localhost, http://localhost:4002.
    • Anywhere else, https://app.openconceptlab.org. Before, that default was app.v3.openconceptlab.org.
  • toV3URL uses it. The path, referrer and auth=true are unchanged.
  • isV3URL still accepts app.v3, so links from TBv3 pages opened on the old host still count as TBv3.

Checks

  • node --test src/common/__tests__/env.test.js src/common/__tests__/announcement.test.js: 27 pass. New toTBv3Origin cases cover production, staging, qa, staging.who, localhost and other hosts.
  • CI eslint is clean.

🤖 Generated with Claude Code

…re TBv3 now is, not app.v3.<env>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/common/env.js Fixed
…env>].openconceptlab.org hosts

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

Copy link
Copy Markdown
Contributor Author

Quick pass: ready to merge once CodeQL is green

  • CodeQL alert fixed in 9d053eb. The host check in toTBv3Origin was the old unanchored 'app.*.openconceptlab.org', now in this diff. It's now /^app\.([a-z0-9]+\.)*openconceptlab\.org$/, with look-alike tests (app.openconceptlab.org.evil.example, myapp.qa…). 27 tests pass, and eslint is clean.
  • Mapping: app.v2[.<env>] → app[.<env>], localhost → :4002, anything else → app.openconceptlab.org. The path, referrer and auth=true are unchanged.
  • Nit: demo and dev have no TBv3 service (and are scaled to 0). app.v2.demo now links to app.demo (TBv2 there) instead of app.v3.demo (no host). Neither link worked before.

🤖 Generated with Claude Code

@snyaggarwal
snyaggarwal merged commit 939943f into master Dec 1, 2026
6 checks passed
@snyaggarwal
snyaggarwal deleted the ocl_online-327-tbv3-link-app branch December 1, 2026 09:51
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