feat(FN-3041): add QuickChatFAB enhancements, AgentLogViewer, insight tools
This merge adds an AgentLogViewer component, improves the NewAgentDialog and QuickChatFAB with mobile keyboard awareness and custom model dropdowns, and introduces insight tools in the CLI extension with tightened typing and comprehensive test coverage. The theme system receives enhancements in `use Fusion-Task-Id: FN-3041
This commit is contained in:
@@ -901,6 +901,40 @@ export function QuickChatFAB({
|
||||
// iOS keeps the keyboard up across that transfer.
|
||||
const stealthInputRef = useRef<HTMLInputElement | null>(null);
|
||||
|
||||
// Lock body scroll while the panel is open on mobile. Otherwise iOS
|
||||
// can leave the document scrolled (e.g. after the keyboard was opened
|
||||
// and dismissed once), and on the next open the position:fixed panel
|
||||
// anchors to layout top:0 which is *above* the visible viewport — only
|
||||
// the bottom of the panel (the input bar) pokes into view at the top of
|
||||
// the screen. Locking the body keeps layout-top and visual-top aligned.
|
||||
useEffect(() => {
|
||||
if (!isOpen) return;
|
||||
if (typeof window === "undefined" || typeof document === "undefined") return;
|
||||
if (window.innerWidth > QUICK_CHAT_DESKTOP_BREAKPOINT) return;
|
||||
|
||||
const scrollY = window.scrollY;
|
||||
const body = document.body;
|
||||
const prev = {
|
||||
position: body.style.position,
|
||||
top: body.style.top,
|
||||
width: body.style.width,
|
||||
overflow: body.style.overflow,
|
||||
};
|
||||
|
||||
body.style.position = "fixed";
|
||||
body.style.top = `-${scrollY}px`;
|
||||
body.style.width = "100%";
|
||||
body.style.overflow = "hidden";
|
||||
|
||||
return () => {
|
||||
body.style.position = prev.position;
|
||||
body.style.top = prev.top;
|
||||
body.style.width = prev.width;
|
||||
body.style.overflow = prev.overflow;
|
||||
window.scrollTo(0, scrollY);
|
||||
};
|
||||
}, [isOpen]);
|
||||
|
||||
// Mirror visualViewport.height onto the panel as --vv-height directly,
|
||||
// bypassing React state. The panel just shrinks when the iOS keyboard
|
||||
// opens — top stays at 0 so the header remains visible.
|
||||
|
||||
@@ -229,10 +229,12 @@ describe("TaskDetailModal", () => {
|
||||
it("styles agent log viewer scroll container scrollbar rules", () => {
|
||||
const css = loadAllAppCss();
|
||||
|
||||
expectBaseRule(css, ".agent-log-viewer", "overflow: hidden;");
|
||||
expectBaseRule(css, ".agent-log-viewer-scroll", "scrollbar-color: var(--border) transparent;");
|
||||
expectBaseRule(css, ".agent-log-viewer-scroll", "scrollbar-width: thin;");
|
||||
expectBaseRule(css, ".agent-log-viewer-scroll::-webkit-scrollbar", "width: 6px;");
|
||||
expectBaseRule(css, ".agent-log-viewer-scroll::-webkit-scrollbar-thumb", "background: var(--border);");
|
||||
expectBaseRule(css, ".agent-log-model-header", "background: var(--bg-tertiary);");
|
||||
});
|
||||
|
||||
it("renders markdown-body without detail-prompt class when prompt exists", () => {
|
||||
|
||||
Reference in New Issue
Block a user