aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-05 11:53:57 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-05 11:53:57 +0200
commit8f25294b0f6bc3f292442edd69a2e149f0717b52 (patch)
tree58cfe661b15fce395ab5116f19341bdb6a5b07fe /packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
parent28752696f376eb11feb686580a435b166750a723 (diff)
downloadmeshbay-8f25294b0f6bc3f292442edd69a2e149f0717b52.tar.gz
feat: open a group, a folder or a file from a #/name@owner link
A group can now be reached by the handle shown under its name, and a path after it points inside the group: #/name@owner/root/dir/file downloads the file and opens Files on its folder; a folder opens Files there. The handle is resolved in the client against the account's own /v1/groups/mine, so no hub route answers for a name and nobody can probe for one. While a group is open the address shows the handle (replace, no history entry); a linked path is taken out of the address once acted on, so a reload does not download twice. Signing in no longer sends everyone home: the form stood in for the page the address named, and that is where a link opened signed out was going. group-link.js holds the parsing and lookups, executed whole by test_group_link.py; harness/group_link_probe.py drives the router in Chrome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/auth-page.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/auth-page.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js b/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
index c12db72..57db475 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
@@ -185,8 +185,12 @@ export function LoginPage({ onLogin }) {
// Trimmed to match the hub's stored username and every client-side key
// derivation (auth_key, bundle_key, recovery_key all fold the username in).
await onLogin(name, password);
- // Back to the invitation that sent them here, if one is waiting.
- navigate(loadPending() ? '/invite' : '/');
+ // Back to the invitation that sent them here, if one is waiting. Otherwise
+ // nowhere: on `#/login` or `#/register` the router sends a signed-in
+ // person home itself, and anywhere else this form stood in for the page
+ // the address names — a group, a file in one — which is where they were
+ // going. Sending everyone home lost every link opened signed out.
+ if (loadPending()) navigate('/invite');
} catch (err) {
if (err.message === 'email_verification_required') {
setPendingVerif(true);