Reviewed the public membership revision ef8c6cd: shared composables, Web components and the uni-app adapter. The source shows the design; this review did not perform a new native-device release.
Start with the dependency boundary
The project keeps useGallery, useForum, useChat and useWeather under shared/. Web and mobile components render their own interfaces around that state. useWeather accepts an API function; the component supplies location acquisition. This makes search and request-order behavior testable without a browser permission prompt.
A useful extraction criterion is whether the rule has the same meaning on both platforms. An order status usually does. Choosing a file, requesting a location and downloading a temporary file have different platform behavior and belong behind adapters.
Give platform capabilities a narrow interface
The mobile adapter uses uni.request, uni.uploadFile and uni storage. Its request function captures the token before sending; a late 401 clears the session only if that token still matches the current one. Keeping this decision at the request boundary avoids each screen inventing its own expiry behavior.
The following interface is a proposed extraction, not a claim that the current project already implements this exact type. A capability should describe its failure behavior as well as its return value.
// Proposed platform boundary
type Position = { latitude: number; longitude: number; accuracy?: number };
type Platform = {
request<T>(path: string): Promise<T>;
locate(): Promise<Position>;
readSession(): string;
};Shared Vue logic still depends on Vue
These composables import ref, watch and lifecycle hooks. They can be shared across the current Vue clients, but a React client cannot simply import them as framework-independent domain code. Pure validation and transition functions are better candidates for reuse across frameworks.
The existing domain.ts uses Row = Record<string, any>. It makes early iteration convenient, but leaves response assumptions unchecked. A next step is to introduce explicit DTOs at API boundaries, then validate external data at runtime. A TypeScript annotation alone cannot validate JSON returned by a server.
What was checked and what remains
On 29 October, the existing request-scope script passed five deferred-response scenarios and the weather script passed twelve scenarios. Their Vue harness stubs mount and unmount registration; these checks do not establish complete lifecycle integration or identical behavior on H5, WeChat and native clients.
For the next platform change, I would record file-picker cancellation, background/resume behavior, location refusal and session expiry separately on each target. This makes the remaining work visible before calling a build ready for release.
Sources & further reading
Compiled from code and documents, with AI-assisted drafting and translation. Examples and proposed checks are learning material; only linked evidence establishes what was run.