Repository navigation
feat(web): add Custom Model Hub tab (Variant C), Chat badge, and EN/ZH i18n - #807
Draft
oldwinter53 wants to merge 1 commit into
Draft
oldwinter53 wants to merge 1 commit into
oldwinter53 wants to merge 1 commit into
Conversation
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
Stacked on top of #802 (
oldwinter53/feat-custom-models-pr1), this PR ships the production Web UI for Variant C (Custom Hub Tab), the Chat / Agent model selectorCustombadge, and complete English + Simplified Chinese localization.What Changed
apps/web/src/features/local-models/local-models-page.tsx)ModelSourceTabs(Local model|BYOK).Local model:Official Curated(default, filteringmodel.origin !== "custom") andCustom · HF / ModelScopewith an installed count badge.<main>frommax-w-(--app-settings-width)(832px) tomax-w-[1200px]when the Custom Hub tab is active, preserving?tab=customalongside?computer=in URL search params.CustomModelHubTab(React.lazy) so Official Curated and BYOK pay zero initial bundle cost.custom-model-hub-tab.tsx,custom-model-blocks.tsx,custom-model-rules.ts,custom-models-queries.ts,local-model-brand.ts)modelBrand/familyBrandintolocal-model-brand.tsso curated and custom entries share identical brand styling.parseOmniboxInputfor HF URLs, ModelScope URLs,owner/repo, plain search), preflight evaluator (1.1xdisk hard-stop, transparent GGUF-header /1.2x + 0.8 GBmemory comfort tiers, incomplete metadata escape hatch), sweet-spot quant selection, and real byte headroom derived fromLocalModelsView.POST .../local-models/custom/search,.../custom/probe,.../custom/download, plus extendedactwithsmoke_test,force, andcontext_tokens).<input type="password">held strictly in React state (zerolocalStorage, cleared on repo switch/unmount, no demo token button).raw_safetensors,mlx_unsupported,no_runnable_files) with 1-click community GGUF search escape..partcleanup notice; Standby-First installed custom model cards withCustom · Untested / Verified / Failedbadges, Quick Smoke Test (ctx=4096), OOMRetry at ctx=2048, corruptRe-download Clean Copy, collapsible redacted diagnostic log,Use for Agents/Return to StandbyreusingMakeRoomDialog/UnloadModelDialog, and 1-click Delete reusingRemoveModelDialogwhen Agents use the model.LOCAL_MODELS_CUSTOM_UNSUPPORTED.apps/web/src/features/rooms/)use-agent-model-selection.ts(useResolvedAgentModelMeta,customLocalModelIds),direct-agent-model-switch.tsx,edit-agent-runtime-dialog.tsx, andquick-create-local-agent-dialog.tsxto cross-referencelocalModelsQueryOptionsbypi_model(model.origin === "custom") and render a localizedCustombadge.custom-models.messages.ts,local-models.messages.ts,local-models-copy.ts,zh-CN.json)customModelsand newlocalModelserror codes, passingcatalog.test.tsandvoice-risk-markers.test.ts.Verification
pnpm --filter @linger/web typecheck— passed (0 errors)pnpm --filter @linger/web lint— passed (--max-warnings=0)pnpm --filter @linger/web test src/features/local-models/ src/i18n/catalog.test.ts src/features/rooms/chat/voice-mode/voice-risk-markers.test.ts src/features/rooms/members/ src/features/rooms/chat/— 99/99 test files passed, 1155/1155 tests passedpnpm --filter @linger/web run build:assets— passed (592.37 kBminified /203.11 kBgzip /176.45 kBBrotli, within all budgets)scripts/ci/check-changed-files.sh origin/oldwinter53/feat-custom-models-pr1 --worktree— passed (English-only + Prettier)pnpm react:doctor --base origin/oldwinter53/feat-custom-models-pr1— passed (0 errors)vite preview(Desktop1440x900curated, custom probed, gated 401, incompatible + smoke-failed; Mobile375x812custom tab) — 0 console/page errors, 0 horizontal overflow (scrollWidth === clientWidth).