Repository navigation
Configurable browser path, re-vendor react-icon-browser - #142
Merged
Merged
Conversation
ICHAVA_BROWSER_PATH (browser.path) moves the browser page and its icon
pages, e.g. to /app, under the same route names. The API and the other
pages stay under the prefix. The old /{prefix}/icons URLs answer 301
with their query kept, so ?icon= deep links survive. Unset, nothing
changes.
Also quote the wildcard CORS origin in .env.example, which the commit
hook requires of a touched file.
The shared popover caret and the movable cookies notice (react-icon-browser#214), with inertia-app rebuilt by build:prod.
The caret now marks itself with data-caret, and the library holds zustand below 5.1.0, whose useStore type change its public API check refuses. icon-browser takes the same range so a fresh build matches the committed bundle.
imanimanyara
marked this pull request as ready for review
November 6, 2026 20:07
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two changes, one per commit.
The browser page at a configurable path (
ICHAVA_BROWSER_PATH)ichava.com wants the browser at
https://ichava.com/app. This makes that a host setting rather than a fork:browser.path(ICHAVA_BROWSER_PATH, read throughHelpers::browserPath()) moves the browser page and its icon pages (/{path}/{id}), under the same route namesichava.inertia.browserandichava.inertia.icons.show. Unset, nothing changes:/{prefix}/iconsas before, and no redirect route is registered./{prefix}/api/v1/...,/{prefix}/settings,/{prefix}/stats, and so on./{prefix}/iconsand/{prefix}/icons/{id}answer 301 to the new URLs with the query string kept (MovedBrowserRedirectController).Route::redirect()was not used because it drops the query, and the browser's deep links live there (?icon=12&q=home)./{prefix}redirects to the new path.ValidateIchavaRouteaccepts the moved path as well as the prefix.ichava.browserPath; the four Inertia pages that link icon pages build them throughiconPageBase()instead of/${prefix}/icons, with a guard test that fails any page building them from the prefix. react-icon-browser itself readswindow.location, so its in-app history and permalinks follow without change.<link rel="canonical">to their own URL without the filter query..,_,-,/between segments, no./..), the bare prefix (would loop with the home redirect), or under{prefix}/api.Re-vendored react-icon-browser at
41b0a4b(react-icon-browser#214)npm run sync:react-icon-browserfrom a freshbuild:lib, then a freshnpm install --no-package-lockandnpm run build:prod, ascommitted-build.ymldoes.zustandis held at>=5.0.15 <5.1.0, matching the vendored library: 5.1.0 came out today and changes theuseStoretype react-icon-browser publishes, so a fresh build taking it would not match the committed bundle. Brings the shared popover caret (drawn in the panel's colours over its edge, centred on the trigger, now on the menus too) and the movable "Cookies & storage" notice.41b0a4bis react-icon-browser#214's head. If that PR is squash-merged rather than merged, the vendored commit is not on itsmainandcheck:consumerswill refuse the next release there; re-vendor from the merge then.Tests
tests/Feature/BrowserPathTest.php: default unchanged, no redirect routes, canonical link, 11 bad values ignored, a nested path accepted.MovedBrowsersuite (MovedBrowserTestCase,browser.path = /app/): route names, page and canonical at/app, 301s with the query kept, icon pages,/ichavaredirect, API and other pages still under the prefix, the shared prop, and unrelated paths still 404.resources/js/core/browserPath.test.ts.vendor/bin/pest438 passed, the new tests included, pint, phpstan (single-process; parallel cannot bind a socket in the sandbox),npm run test:js119 passed,typecheck:inertia, eslint.e2e/a11y.spec.ts, which needs a running seeded host (ICHAVA_E2E_URL).Consumers
ichava.com needs a tag containing this before it can set
ICHAVA_BROWSER_PATH=app(its PR depends on^0.1.1).