Fix/mobile hide typewriter#74
Open
fallleave001 wants to merge 20 commits into
Open
Conversation
… settings.json - New ToolsConfig component with per-tool toggle switches (built-in + extensions) - New /api/tools endpoint for tool enumeration and config persistence - Tools button in left sidebar replaces old wrench-icon preset dropdown - Config stored in settings.json 'activeTools' field, shared with pi-cli - startRpcSession reads saved config on session creation - getPresetFromTools uses superset matching for extension compatibility
…low on long linear sessions sm.getTree() produces a deeply nested chain for long linear sessions (3000+ messages = 3000-level depth), causing JSON.stringify to overflow the call stack. The tree field is unused by the UI.
NEXT_PUBLIC_* env vars are resolved at build time, so upgrading pi-coding-agent after building won't update the displayed version. Fix by reading versions via /api/version at runtime.
…gify stack overflow Instead of removing the tree field (which breaks BranchNavigator), apply a compression that collapses consecutive single-child nodes into their parent. This reduces depth from 2000+ to the number of branching points, avoiding the JSON.stringify call stack limit while preserving all branch navigation.
…gify stack overflow Instead of removing the tree field (which breaks BranchNavigator), apply a compression that collapses consecutive single-child nodes into their parent.
…gify stack overflow Instead of removing the tree field (which breaks BranchNavigator), apply a compression that collapses consecutive single-child nodes into their parent. This reduces depth from 2000+ to the number of branching points, avoiding the JSON.stringify call stack limit while preserving all branch navigation.
…after Disable all
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
Fix mobile portrait mode flickering on iQOO 10 (and other narrow-screen devices). The page content jumped up/down every ~5 seconds when viewing the new session landing page in portrait mode.
Root Cause
The
Typewritercomponent cycles through 18 placeholder phrases (e.g., "ready when you are.", "ask me anything.", "fix that pesky bug.") by typing and deleting characters one by one:On wide screens (>640px, e.g. desktop/landscape), the varying text width is absorbed naturally. On narrow screens (≤640px, e.g. mobile portrait, ~412px wide), the expanding text overflows the flex container, causing the entire "π Pi Agent Web" title line to wrap to two lines. This pushes the chat input below it up/down by one line height, creating a visible "jump" synchronized with the typewriter animation.
Fix
Hide the typewriter component on screens ≤640px via CSS:
typewriter-hintto the typewriter's wrapper span@media (max-width: 640px)rule todisplay: noneit on narrow screensThe breakpoint matches pi-web's existing mobile/desktop boundary (used by the sidebar overlay, layout adjustments, etc.), so the behavior is consistent with the rest of the UI.
Design decision
Alternative approaches considered and rejected:
Changes
File | Change -- | -- components/ChatWindow.tsx | Added className="typewriter-hint" to typewriter wrapper app/globals.css | Added @media (max-width: 640px) { .typewriter-hint { display: none !important } }Testing