aa - #781
Open
brakchen wants to merge 4 commits into
Open
Conversation
…r in pi-web
The `@liziy/token-stats` plugin and similar extensions register their
status bar via `ctx.ui.setFooter(factory)`. The pi-web UI adapter had
`setFooter: () => {}` as a no-op, so the entire footer (token usage,
quotas, cwd, model) was dropped silently when those extensions ran in
pi-web.
Map the SDK's `setFooter(factory)` factory onto the existing widget
pipeline pinned to placement "footer":
- `lib/types.ts` / `lib/pi-types.ts`: extend the widget placement
union with "footer" so `ExtensionWidgetItem` and `WidgetOptionsLike`
can carry it.
- `lib/rpc-manager.ts`: add `FooterDataProviderLike` (getGitBranch
returns null, getExtensionStatuses reuses the existing status map,
onBranchChange is a no-op unsubscribe — pi-web doesn't watch
.git/HEAD), extend `ExtensionWidgetFactory` to take an optional third
footerData argument, and route setFooter into the existing widget
factory path with placement="footer".
- `components/ExtensionWidgets.tsx`: split widgets by placement —
aboveEditor/belowEditor widgets continue to use the 108px trigger chip
UX; footer widgets render as a full-width multi-line block with the
same updating pulse animation.
- `app/globals.css`: add `.extension-footer-widgets` /
`.extension-footer-widget` styles for the new full-width footer
area.
- `lib/i18n/messages/{en,zh-CN,zh-TW}.ts`: add labels for the new
footer widget area.
Also adds a SAFETY: comment to a handful of pre-existing
`as unknown as SessionEntry[]` casts in rpc-manager.ts that the
project's lint self-scan was re-flagging on every edit (these are
SDK SessionManager.getEntries() returning the same entry shape as
SessionEntry[]; no behavior change).
Bulk commit of pre-existing in-progress edits in the working tree: - File explorer + viewer + icons (large refactor across components/) - Markdown body / message view tweaks - Chat window + agent session hooks - App layout / manifest / next.config / PWA service worker - lib/request-security, lib/web-push helpers - lib/command-timeout-prompt.ts, lib/tool-elapsed.ts new helpers - offline.html, package-lock.json Companion to the setFooter commit (8fa03a9); see that commit for the setFooter-specific rationale.
Synced 57 commits from upstream including: - Readable themes and toolbar theme selector - Browser password login - Paginated large text file previews - Rich-text paste link preservation - Terminal panel support - Session search functionality - Various bug fixes and improvements Resolved conflicts in: - app/manifest.ts (basePath preservation) - components/ChatWindow.tsx (tool elapsed + search block) - components/FileViewer.tsx (API_BASE_PATH + VideoViewer + pagination) - components/MarkdownBody.tsx (API_BASE_PATH + shouldOpenLocalFileInApp) - components/MessageView.tsx (running tool elapsed + search block) - public/sw.js (BASE_PATH + renotify)
- lib/rpc-manager.ts: PlainTextTheme empty-string colors were stripped by the production minifier, causing Theme constructor to crash on undefined.startsWith(). Use "#000000" placeholders and provide all color keys to prevent minification removal. - proxy.ts: middleware redirects used new URL() which dropped the basePath prefix. Use request.nextUrl.clone() + pathname assignment so redirects respect the configured basePath. - app/login/page.tsx: replace next/image with <img> to avoid _next/image optimization failing on basePath; prepend basePath in safeDestination() for post-login redirect. - components/AppShell.tsx: router.replace(window.location.pathname) included the basePath, causing double prefix (/pi-web/pi-web) on client-side navigation. Use usePathname() which returns the internal path without basePath. - components/SettingsPanel.tsx: logout redirect missing basePath.
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.
No description provided.