Skip to content

Commit e8a1b82

Browse files
authored
Merge pull request #2153 from mito-ds/fix/chat-history-width
mito-ai: fix dropdown width
2 parents e1dd786 + 484970d commit e8a1b82

File tree

2 files changed

+34
-12
lines changed

2 files changed

+34
-12
lines changed

.cursor/commands/verify.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,24 @@ After each interaction:
4242

4343
### 7. Rebuild and Re-test
4444

45-
After making fixes:
46-
47-
1. **Setup Environment**:
48-
- For frontend changes: Wait a few seconds for rebuild to complete
49-
- For backend changes: Restart and relaunch the server
50-
51-
2. **Refresh browser**:
52-
- Take new snapshot
45+
After making code changes and before testing again:
46+
47+
1. **For Frontend Changes** (TypeScript/React/CSS/JavaScript):
48+
- Wait a few seconds for the build to complete (check the TypeScript terminal)
49+
- **Refresh the browser** to load the updated code:
50+
- Use browser navigation to reload the page, or
51+
- Use browser refresh functionality
52+
- Retest the feature
53+
54+
55+
2. **For Backend Changes** (Python/server code):
56+
- **Shut down the Jupyter server** (stop the running JupyterLab process)
57+
- **Relaunch the Jupyter server** to load the updated backend code
58+
- Navigate to the JupyterLab URL again
59+
- Wait 3-5 seconds for full page load
60+
- Take a new snapshot
5361
- Re-test the feature
54-
- Verify fix worked
5562

5663
### 8. Iterate Until Complete
5764

58-
Repeat steps 4-7 until the feature works correctly.
65+
Repeat steps 4-7 until the feature works correctly.

mito-ai/style/DropdownMenu.css

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
1919
display: flex;
2020
flex-direction: column;
21-
min-width: 200px;
21+
min-width: 225px;
2222
white-space: nowrap;
2323
height: 400px;
24-
min-width: 225px;
2524
max-width: 350px;
2625
overflow-y: auto;
2726
}
@@ -38,6 +37,22 @@
3837
left: auto;
3938
}
4039

40+
/* Responsive width based on chat taskpane container width */
41+
/* Make dropdown width relative to container width, accounting for padding */
42+
/* At minimum taskpane width (350px), dropdown should fit within available space (330px accounting for 20px padding) */
43+
@container (max-width: 350px) {
44+
.dropdown-menu {
45+
max-width: calc(100cqw - 20px);
46+
}
47+
}
48+
49+
/* For wider taskpanes, allow dropdown to use up to 350px but still respect container width */
50+
@container (min-width: 351px) {
51+
.dropdown-menu {
52+
max-width: min(350px, calc(100cqw - 20px));
53+
}
54+
}
55+
4156
.dropdown-item-row {
4257
display: flex;
4358
flex-direction: row;

0 commit comments

Comments
 (0)