Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 75 additions & 16 deletions app/public/css/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,6 @@
background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

.toolbar-button[aria-pressed="true"] {
background: var(--falkor-accent, rgba(150,120,220,0.22));
transform: translateY(-4px) scale(1.03);
}

#toolbar-buttons {
display: flex;
flex-direction: column;
Expand All @@ -364,19 +359,83 @@
flex-shrink: 0;
}

@media (max-width: 768px) {
#left-toolbar {
left: 8px;
top: 12px;
bottom: auto;
width: auto;
height: 48px;
padding: 4px;
border-radius: 8px;
flex-direction: row;
/* Collapsed state: only show the burger button. Remove background/border/shadow so the bar is unobtrusive. */
#left-toolbar.collapsed {
/* minimize width to avoid blocking content */
width: 0px;
padding: 0;
transition: width 220ms ease, padding 220ms ease, background 200ms ease;
background: transparent;
box-shadow: none;
border: none;
align-items: flex-start; /* keep burger at top */
overflow: visible;
position: relative; /* allow z-index for inner button */
pointer-events: none; /* let clicks pass through, but burger will override */
}

#left-toolbar.collapsed .toolbar-button {
display: none; /* hide all toolbar buttons */
}

#left-toolbar.collapsed #burger-toggle-btn {
display: flex;
width: 48px;
height: 48px;
margin: 6px 0;
position: absolute;
top: 6px;
left: 6px;
z-index: 9999; /* keep on top so it's always clickable */
pointer-events: auto;
}
Comment on lines +381 to +391
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Lower burger z-index to fit your stacking context (avoid covering modals).

Burger uses z-index: 9999, while modals/buttons are in the ~100–2000 range. This can put the burger above dialogs/tooltips unintentionally.

Apply:

 #left-toolbar.collapsed #burger-toggle-btn {
   display: flex;
   width: 48px;
   height: 48px;
   margin: 6px 0;
   position: absolute;
   top: 6px;
   left: 6px;
-  z-index: 9999; /* keep on top so it's always clickable */
+  z-index: 2001; /* above header buttons (2000), below modals as needed */
   pointer-events: auto;
 }

Scan z-index usage to confirm the scale:


🏁 Script executed:

#!/bin/bash
rg -nP 'z-index\s*:\s*\d+' app/public/css | sort -t: -k3,3n

Length of output: 848


Lower burger toggle z-index to sit below modals and above header buttons

The #left-toolbar.collapsed #burger-toggle-btn is currently set to z-index: 9999, which will render it above all modals (whose highest z-index in app/public/css/modals.css is 3000) and risk covering dialogs or tooltips. We should reduce it to 2001 so it still appears above header buttons (z-index 2000) but below any modal layers.

Affected location:

  • File: app/public/css/buttons.css
    Lines: ~381–391

Proposed change:

 #left-toolbar.collapsed #burger-toggle-btn {
   display: flex;
   width: 48px;
   height: 48px;
   margin: 6px 0;
   position: absolute;
   top: 6px;
   left: 6px;
-  z-index: 9999; /* keep on top so it's always clickable */
+  z-index: 2001; /* above header buttons (2000), below modals (>=3000) */
   pointer-events: auto;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#left-toolbar.collapsed #burger-toggle-btn {
display: flex;
width: 48px;
height: 48px;
margin: 6px 0;
position: absolute;
top: 6px;
left: 6px;
z-index: 9999; /* keep on top so it's always clickable */
pointer-events: auto;
}
#left-toolbar.collapsed #burger-toggle-btn {
display: flex;
width: 48px;
height: 48px;
margin: 6px 0;
position: absolute;
top: 6px;
left: 6px;
z-index: 2001; /* above header buttons (2000), below modals (>=3000) */
pointer-events: auto;
}
🤖 Prompt for AI Agents
In app/public/css/buttons.css around lines 381 to 391 the
#left-toolbar.collapsed #burger-toggle-btn rule sets z-index: 9999 which forces
the burger toggle above modals; change that z-index to 2001 so the toggle
remains above header buttons (z-index 2000) but beneath modal layers (max
z-index ~3000) — update the z-index value in that rule to 2001 and keep the rest
of the rule unchanged.


/* Mobile fallback: without JS, default to only the burger visible on small viewports */
@media (max-width: 767px) {
#left-toolbar.collapsed {
width: 0px;
padding: 0;
background: transparent;
box-shadow: none;
border: none;
align-items: flex-start;
pointer-events: none;
}

/* When NOT collapsed on mobile, show full toolbar */
#left-toolbar:not(.collapsed) {
width: 48px;
padding: 6px 6px;
background: var(--bg-tertiary, rgba(255,255,255,0.02));
box-shadow: 0 6px 18px rgba(0,0,0,0.25);
border: 1px solid var(--border-color, rgba(255,255,255,0.03));
backdrop-filter: blur(6px);
align-items: center;
pointer-events: auto;
z-index: 1050;
}

/* On mobile hide buttons only when explicitly collapsed (so burger can open toolbar) */
#left-toolbar.collapsed .toolbar-button { display: none; }
#left-toolbar.collapsed #burger-toggle-btn {
display: flex;
width: 48px;
height: 48px;
position: absolute;
top: 6px;
left: 6px;
pointer-events: auto;
}
/* When not collapsed, show toolbar buttons as normal */
#left-toolbar:not(.collapsed) .toolbar-button { display: flex; }
#left-toolbar:not(.collapsed) #burger-toggle-btn {
display: flex;
position: relative;
top: auto;
left: auto;
pointer-events: auto;
}
#left-toolbar-inner { flex-direction: row; gap: 6px; }
}



18 changes: 18 additions & 0 deletions app/public/css/chat-components.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@
background-color: var(--falkor-secondary);
}

@media (max-width: 768px) {
.chat-messages {
padding: 2px;
}

.chat-container {
padding-right: 10px;
padding-left: 10px;
padding-top: 10px;
padding-bottom: 10px;
/* Ensure no horizontal overflow */
max-width: 100vw;
overflow-x: hidden;
box-sizing: border-box;
/* Ensure content is accessible when toolbar is open */
transition: margin-left 220ms ease;
}
}
Comment on lines +31 to +48
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix 768 vs 767 breakpoint mismatch (off-by-one at exactly 768px).

JS uses (min-width: 768px) for “desktop”, and buttons.css uses @media (max-width: 767px) for “mobile”. Here you use @media (max-width: 768px), which causes the mobile chat rules to apply at exactly 768px while the toolbar treats 768px as desktop. Unify to 767px to avoid layout jitter at 768px.

Apply:

-@media (max-width: 768px) {
+@media (max-width: 767px) {
🤖 Prompt for AI Agents
In app/public/css/chat-components.css around lines 31 to 48, the media query
uses @media (max-width: 768px) which conflicts with other files that treat 768px
as desktop; change the breakpoint to @media (max-width: 767px) so mobile styles
apply up to 767px and 768px is consistently handled as desktop; update that
single media rule and verify related comments remain accurate.

.message-container {
display: flex;
flex-direction: row;
Expand Down
187 changes: 169 additions & 18 deletions app/public/css/responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,55 @@

/* Layout Responsive */
@media (max-width: 768px) {
.chat-container {
padding-right: 10px;
padding-left: 10px;
padding-top: 10px;
padding-bottom: 10px;
/* When left toolbar is open, push content to make room */
body.left-toolbar-open .chat-container {
max-width: calc(100vw - 48px);
}

/* Ensure body doesn't overflow */
body {
max-width: 100vw;
overflow-x: hidden;
}

Comment on lines +5 to +15
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Standardize breakpoint and de-duplicate the “48px” constant via a CSS variable.

  • Breakpoint: Align with JS/buttons (desktop ≥ 768, mobile ≤ 767). Use max-width: 767px here.
  • DRY: The left toolbar width (48px) is hard-coded multiple times. Use a shared custom property so updates don’t require multi-file edits.

Apply:

-@media (max-width: 768px) {
+@media (max-width: 767px) {
-  body.left-toolbar-open .chat-container {
-    max-width: calc(100vw - 48px);
-  }
+  body.left-toolbar-open .chat-container {
+    max-width: calc(100vw - var(--left-toolbar-width, 48px));
+  }
@@
-  #container {
+  #container {
     width: 100%;
     max-width: 100vw;
     overflow-x: hidden;
     box-sizing: border-box;
     transition: margin-left 220ms ease;
   }
@@
-  body.left-toolbar-open #container {
-    margin-left: 48px;
-    width: calc(100% - 48px);
-    max-width: calc(100vw - 48px);
-  }
+  body.left-toolbar-open #container {
+    margin-left: var(--left-toolbar-width, 48px);
+    width: calc(100% - var(--left-toolbar-width, 48px));
+    max-width: calc(100vw - var(--left-toolbar-width, 48px));
+  }

And near the top of a globally loaded CSS (or here if that’s acceptable):

+:root {
+  /* Single source of truth for the mobile toolbar width */
+  --left-toolbar-width: 48px;
+}

Also applies to: 16-24, 25-31, 37-41, 43-54

🤖 Prompt for AI Agents
In app/public/css/responsive.css around lines 5 to 15, the CSS uses a hard-coded
48px toolbar width and an inconsistent breakpoint; create a custom property
(e.g., --left-toolbar-width: 48px) near the top of a globally loaded CSS file
(or at the top of this file) and replace all literal 48px occurrences with
calc(var(--left-toolbar-width)); update the responsive breakpoint to use
max-width: 767px for mobile (and ensure any corresponding media queries follow
desktop ≥768px / mobile ≤767px logic), and apply the same replacement for the
other affected ranges (lines 16-24, 25-31, 37-41, 43-54).

/* Main container mobile adjustments */
#container {
width: 100%;
max-width: 100vw;
overflow-x: hidden;
box-sizing: border-box;
transition: margin-left 220ms ease;
}

/* Adjust container when toolbar is open */
body.left-toolbar-open #container {
margin-left: 48px;
width: calc(100% - 48px);
max-width: calc(100vw - 48px);
}

/* Prevent any background showing behind the shifted content */
body.left-toolbar-open {
background: var(--falkor-secondary);
}

/* Ensure chat container fills the available space properly */
body.left-toolbar-open .chat-container {
background: var(--falkor-secondary);
border-left: none;
}

/* Ensure chat header elements are properly positioned when toolbar is open */
body.left-toolbar-open .chat-header {
padding-left: 15px; /* Add extra padding to prevent overlap */
width: 100%;
box-sizing: border-box;
}

/* Ensure dropdown and buttons in header don't get cut off */
body.left-toolbar-open .chat-header > * {
margin-left: 0;
width: 100%;
}
}

Expand Down Expand Up @@ -56,22 +100,102 @@

/* Button Container Responsive */
@media (max-width: 768px) {
.button-container {
flex-direction: row;
.chat-header .button-container {
width: 100%;
max-width: 100%;
padding: 0 10px;
margin: 0;
box-sizing: border-box;
gap: 8px;
flex-wrap: nowrap;
align-items: stretch;
}

/* Hide vertical separators on mobile */
.vertical-separator {
display: none;
}

/* Make selectors and buttons fit screen width */
#graph-select,
#custom-file-upload {
flex: 1;
min-width: 0;
padding: 8px 6px;
font-size: 13px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
height: 40px;
box-sizing: border-box;
}

#graph-select {
max-width: 30%;
}

#custom-file-upload {
max-width: 35%;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}

.dropdown-container {
flex: 1;
max-width: 35%;
}

.custom-dropdown {
width: 100%;
height: 40px;
}

.dropdown-selected {
padding: 8px 6px;
font-size: 13px;
height: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
}

.dropdown-text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
flex: 1;
}

.dropdown-arrow {
margin-left: 4px;
flex-shrink: 0;
}
}

/* Select Elements Responsive */
@media (max-width: 768px) {
@media (max-width: 480px) {
.chat-header .button-container {
padding: 0;
gap: 5px;
}

#graph-select,
#custom-file-upload,
#open-pg-modal {
min-width: 120px;
width: auto;
padding: 8px 10px;
font-size: 14px;
flex: 1;
#custom-file-upload {
padding: 6px 4px;
font-size: 12px;
height: 36px;
}

.custom-dropdown {
height: 36px;
}

.dropdown-selected {
padding: 6px 4px;
font-size: 12px;
}
}

Expand Down Expand Up @@ -99,8 +223,35 @@
}

.chat-input {
padding: 12px 16px;
gap: 12px;
padding: 0px;
gap: 8px;
/* Ensure it fits within viewport width */
margin: 0;
box-sizing: border-box;
}

.input-container {
/* Reduce padding on mobile to maximize input space */
padding: 8px;
gap: 4px;
min-width: 0; /* Allow container to shrink */
flex-shrink: 1;
}

#message-input {
font-size: 16px !important; /* Prevent zoom on iOS */
min-width: 0; /* Allow input to shrink */
}

#message-input::placeholder {
font-size: 16px !important;
}

/* Ensure buttons don't overflow */
.input-button {
width: 40px;
height: 40px;
flex-shrink: 0; /* Prevent buttons from shrinking */
}
}

Expand Down
Loading
Loading