Repository navigation
feat(apps): U1 scaffold — apps/ workspace, Leptos shell, remote contract, Sessions remote, CI and size gate - #173
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…act, Sessions remote stub, CI and size gate Adds apps/ as its own Cargo workspace (ADR-0018) with qq-ui-common (protocol compatibility range, authenticated /v1/health probe with credential-free errors, RemoteConfig/RemoteManifest contract types), qq-shell (Leptos CSR shell: remotes from remotes.json, hash routing, in-memory server list, dynamic import of remotes, mount/unmount with a stale-load guard) and qq-sessions (first remote; exports mount/unmount). Static PWA assets, build.sh/size-gate.sh (600 KB gzip per artifact) and .github/workflows/apps.yml. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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.
Stacked on #167 (ADR-0017/0018); base is that branch so only the U1 diff shows. Retarget to
mainonce #167 lands.What changes for users
A first web surface for
qq serve, in a newapps/directory (not part of the root workspace):apps/shell, Leptos 0.8 CSR). Top bar lists remotes fromremotes.json;#/<name>opens one. Left rail: connect a server by URL + credential (GET /v1/healthwith bearer auth), up to 16, remove again. The credential input is cleared on success and the credential never appears in a URL, error, or log.old-box (qq 0.1.0) speaks protocol 27; this UI supports protocol 28. Upgrade qq on that server, or use an older build of this UI.A newer server gets the mirror text ("update this UI, or use an older qq"). Bad credential:
http://127.0.0.1:9077 rejected the credential.apps/sessions), the first independently deployed remote. In U1 it shows the servers the shell bound to it; U3–U5 fill in workspaces, session tree, transcript, composer.manifest.webmanifest, icon, and a small service worker (same-origin GET, network-first, ≤ 64 cached entries). API traffic toqq servenever touches the worker.Screenshots (Chrome,
dist/on127.0.0.1:8090, realqq serve --allow-originon:9077):/v1/health)Why / design
Slice:
docs/plans/multi-surface-clients.md#u1--scaffold· ADR-0017 (Leptos, accepted), ADR-0018 (apps/workspace). Ledger:docs/plans/progress/multi-surface-clients.md.Linear: ENG-
Remote contract (framework-neutral; what Fleet/Approvals/Billing/Onboarding will implement):
module/wasmURLs resolve against the shell document, so a remote can live on another origin;build.shemitsdist/(hashed shell) +dist/remotes/<name>/(unhashed, so the manifest is stable across remote deploys).import()cannot be expressed in wasm-bindgen, soindex.htmlprovideswindow.qqShell.importRemote(moduleUrl, wasmUrl);loader.rscalls it and checks the exports exist before mounting. Loaded remotes are cached per name; a generation counter drops a load that completes after the user navigated away.SessionClient/SSE against the servers it receives; state is shared by protocol, not memory (ADR-0017). The shell therefore hands the credential over in-memory viamount, never via URL.qq-ui-commondeliberately does not linkqq-clientyet — nothing in U1 uses it; W3 addsServerSetand the shell Overview.UnmountHandle<M>names the view-state type, which is private to theview!expansion; the remote stores it asBox<dyn Any>(drop = unmount).--all-targetsclippy on wasm32 compiles test targets, soprobetests (which usefutures-executor) arecfg(all(test, not(wasm32))).devin/<timestamp>-<slug>convention rather than AGENTS.md'stype/desc; commit and title follow Conventional Commits.How verified
Root workspace untouched (no member added;
apps/and.github/workflows/apps.ymlonly).cd apps &&cargo fmt --all --checkcargo clippy --workspace --locked --target wasm32-unknown-unknown --all-targets -- -D warningscargo clippy --workspace --locked --all-targets -- -D warnings(native)cargo test --workspace --locked— 8 passed (compat: current / older / newer;probe: bad address, bad credential, plaintext non-loopback refused before any request, messages never carry the credential;remote: config round-trip, other contract / bad servers / too many, manifest names + duplicates)./build.sh && ./size-gate.sh:/home/ubuntu/shell_shots.py, not committed): fake protocol-27 server → refusal text above; wrong token on the real server →rejected the credential; right token → server card, password field emptied; click Sessions → remote imported, initialised and mounted with 1 server; remove → remote re-mounted with0 servers;#/fleet→no remote named "fleet" in remotes.json, outlet has 0 children;manifest.webmanifestserved (display: standalone); one service worker registered. No console errors other than the expected 401.Appsworkflow (fmt, wasm32 clippy, native tests, build, size gate,apps-distartifact); path-filtered toapps/**,crates/qq-client/**,crates/qq-protocol/**. First run is on this PR.Impact
qq-clientcost (~190 KB gzip) when W3 links it.SUPPORTED_PROTOCOLis28..=28; widening it is a one-line change inapps/ui-common/src/compat.rswhen the server gains a compatibility window.qq-protocol/qq-clientuntouched.apps/README.md(layout, contract, build/run, checks); ledger entry + status row.docs/design/unchanged (no kernel boundary moved).Link to Devin session: https://app.devin.ai/sessions/65d1540c06e44446b555b398b659de78
Open in Devin Desktop: https://app.devin.ai/desktop/session/65d1540c06e44446b555b398b659de78?variant=devin
Requested by: @integrate-your-mind