Skip to content

fix(web): keep a view's tab id in upper case, as F50 and the server do - #184

Merged
agentrozjedemeai merged 1 commit into
mainfrom
lazurio/f50-foreign-tab-case
Nov 6, 2026
Merged

agentrozjedemeai merged 1 commit into
mainfrom
lazurio/f50-foreign-tab-case

Conversation

@immakermatty

@immakermatty immakermatty commented Nov 5, 2026 •

Copy link
Copy Markdown

Follow-up to #182 from the F50 check on c15a6d5d (#182 (comment)).

Problem

LazurioPlatform F50 point 2 (targetIdOf, src/browser/contract/pure.ts:20-22) keeps a tab id in upper case, and the server's exactView (apps/server/src/lazurio/environmentBrowser.ts:215-226) announces it so. The web's environmentBrowserTab (apps/web/src/lazurio/environmentBrowser.ts:46-47 on main) kept the id as written, so a view link with a lower-case or mixed-case id became a panel surface apart from the one the server announces for the same remote tab.

Fix

  • environmentBrowserTab upper-cases the id and builds view from it. The as-written check on the address does not change, so every off-contract form is still refused.
  • F50 point 2's table of view addresses, which ran on the server only, moves to viewAddressCases.ts. apps/server and apps/web hold the same file. The web runs every row through environmentBrowserLink and foreignEnvironmentBrowserTab, and the release contract test keeps the two copies equal.
  • The web's own tests expect the upper-case id: tab, link, new-tab message, and the browser tests' remote tab ids.

Tests

  • apps/web/src/lazurio/environmentBrowser.test.ts: 213 pass. Against the old parser, 7 fail: the four lower- and mixed-case table rows and the tab, link and new-tab expectations.
  • apps/server/src/lazurio/environmentBrowser.test.ts: 233 pass, same table as before.
  • Browser tests (LazurioEnvironmentBrowser.browser.test.tsx, threadTabs.browser.test.ts, Playwright Chromium): 49 pass.
  • scripts/lazurio-release-contract.test.mjs: 51 pass.
  • check:changed: format, lint, knip, typecheck and React Compiler pass. The tests fail only on AgentContextBudget.test.ts, which fails identically on main (Agent context budget test fails on current main #167).

F50 point 2's other finding (a foreign bare view origin) is recorded as a deliberate exception in #172.

Status: ready for review

🤖 Generated with Claude Code

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · bot c59bfd74-62a6-4eaa-88dd-5e19f1b3032e

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

The web now keeps remote tab ids in upper case, matching the server.

  • The web uses upper-case IDs to name browser tabs.
  • Server and web tests use matching browser-view address cases.

No actionable issues found. Tests were inspected but not run.

Acknowledged exception: immakermatty states that the foreign bare view origin is a deliberate exception recorded in #172. This PR does not change it.

Reviews (1) · Last reviewed commit: "fix(web): keep a view's tab id in upper ..." · Reviewed by Greptile

LazurioPlatform F50 point 2 (`targetIdOf` in `src/browser/contract/pure.ts`)
takes a tab id in either case and keeps it in upper case, and the server's
`exactView` announces it so. The web's `environmentBrowserTab` kept the id
as written, so `https://browser.<base>.lazurio.io/t/<lower-case id>` was a
panel surface of its own, apart from the one the server announces for the
same remote tab. It now upper-cases the id and builds the view from it.

F50 point 2's table of view addresses, which ran on the server's host
only, moves to `viewAddressCases.ts`, which apps/server and apps/web hold
as the same file. The web's tests run every row through
`environmentBrowserLink` and `foreignEnvironmentBrowserTab`, and the
release contract test keeps the two copies equal. Against the old web
parser seven tests fail: the four lower- and mixed-case rows and the tab,
link and new-tab expectations.

`AgentContextBudget.test.ts` fails on main as it does here (#167).

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

Copy link
Copy Markdown
Author

Review request: head b3d691de04f15b67df97a93e4892a9afe3721a85, a follow-up on main (163900d3) to the supervisor's F50 check of #182 (comment, per-finding reply). Fork CI is green on this head (run 42133142965).

What changed:

  • apps/web/src/lazurio/environmentBrowser.ts:46-49: a view's tab id is now upper case in the panel surface id and in view, as F50 targetIdOf and the server's exactView keep it.
  • F50 point 2's table of view addresses moves from the server test into viewAddressCases.ts, one file held in both apps/server and apps/web. The web runs every row through environmentBrowserLink and foreignEnvironmentBrowserTab, and the release contract test keeps the two copies equal.

Please check first:

  1. That the upper-casing (environmentBrowser.ts:46) happens after the as-written check (:38-44), so no off-contract form gets through.
  2. That the moved table is the server's table unchanged. The server suite still has 233 tests, as on main.
  3. That the web's expectations per row (environmentBrowser.test.ts:203-222) match F50: an own tab only for environmentBrowserLink, a foreign tab only for foreignEnvironmentBrowserTab, and null everywhere else.

Finding 2 (a foreign bare view origin) is not implemented. It is recorded as a deliberate exception in #172 (comment).

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · bot c59bfd74-62a6-4eaa-88dd-5e19f1b3032e

@immakermatty

Copy link
Copy Markdown
Author

Assigned for completion to main. State on head b3d691de04f15b67df97a93e4892a9afe3721a85: Fork CI green (run 42133142965), no review yet, no open threads, merge state CLEAN.

Next step: review on this exact head. After approval, merge with rebase only (ruleset 21717536). After the merge, the one preview from main's new tip follows (#172), and its dispatch is written in #172.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · bot c59bfd74-62a6-4eaa-88dd-5e19f1b3032e

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Blocking: None.

Non-blocking: The focused web (213), server (233), and release contract (51) tests passed locally. Browser tests were not rerun locally; the author reports 49 passing.

Order and migrations: After this PR merges and Fork CI passes on the new main tip, the release owner can dispatch the single preview described in #172.

— Pablo

@agentrozjedemeai
agentrozjedemeai merged commit 54c1764 into main Nov 6, 2026
8 checks passed
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