Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
406da41
feat: Transform sticky notes to compact 260x100px rectangles
rodrigosnader Oct 7, 2025
afa5d3e
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 7, 2025
7de02d6
merged main
deon-sanchez Dec 16, 2025
0f4bec9
revert stp
deon-sanchez Dec 16, 2025
e9e1e16
increase size to 280x140 and gh suggestions
Cristhianzl Jan 6, 2026
ca315d1
merge fix
Cristhianzl Jan 6, 2026
dc213d7
add padding
Cristhianzl Jan 6, 2026
efedee4
merge fix
Cristhianzl Jan 6, 2026
de0f795
Merge branch 'main' into feature/compact-sticky-notes
Cristhianzl Jan 6, 2026
44507eb
Merge branch 'main' into feature/compact-sticky-notes
Cristhianzl Jan 8, 2026
3692deb
fix tests jest
Cristhianzl Jan 8, 2026
dd69423
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 8, 2026
f8dcebb
fix tests sticky notes
Cristhianzl Jan 8, 2026
dbdf1ec
Merge branch 'feature/compact-sticky-notes' of github.com:langflow-ai…
Cristhianzl Jan 8, 2026
1ae093f
Merge branch 'main' into feature/compact-sticky-notes
Cristhianzl Jan 8, 2026
6b56ea8
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 8, 2026
53849e9
add openai api key
Cristhianzl Jan 8, 2026
43d740c
Merge branch 'main' into feature/compact-sticky-notes
Cristhianzl Jan 8, 2026
d319a83
fix research translation loop
Cristhianzl Jan 8, 2026
6c0bf05
Merge branch 'main' of github.com:langflow-ai/langflow into feature/c…
viktoravelino Jan 21, 2026
8110420
Enhance scrollbar visibility for sticky notes
viktoravelino Jan 21, 2026
99d36df
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 21, 2026
7e5e684
Merge branch 'main' into feature/compact-sticky-notes
viktoravelino Jan 21, 2026
d59f1e3
Merge branch 'main' into feature/compact-sticky-notes
viktoravelino Jan 21, 2026
8f0942f
fix: GitHub Actions explixitly set grep string
Adam-Aghili Jan 21, 2026
fdcf2fb
revert some files
viktoravelino Jan 21, 2026
710ca2f
Merge branch 'feature/compact-sticky-notes' of github.com:langflow-ai…
viktoravelino Jan 21, 2026
9eafb12
Merge branch 'main' into feature/compact-sticky-notes
viktoravelino Jan 21, 2026
98a5bae
Merge branch 'main' into feature/compact-sticky-notes
viktoravelino Jan 22, 2026
e24090a
fix: Update outdated components test assertions for accuracy
viktoravelino Jan 22, 2026
ee6e4af
fix: Correct test selector for Chroma DB in tweaksTest.spec.ts
viktoravelino Jan 22, 2026
6526688
Merge branch 'main' into feature/compact-sticky-notes
viktoravelino Jan 22, 2026
796aa14
Merge branch 'main' into feature/compact-sticky-notes
viktoravelino Jan 22, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function NodeDescription({
linkTarget="_blank"
className={cn(
"markdown prose flex w-full flex-col leading-5 word-break-break-word [&_pre]:whitespace-break-spaces [&_pre]:!bg-code-description-background [&_pre_code]:!bg-code-description-background",
stickyNote ? "text-mmd" : "text-xs",
stickyNote ? "text-base font-medium leading-relaxed" : "text-xs",
mdClassName,
)}
>
Expand Down Expand Up @@ -156,7 +156,7 @@ export default function NodeDescription({
className={cn(
"nowheel w-full text-xs focus:border-primary focus:ring-0",
stickyNote
? "overflow-auto p-0 px-2 pt-0.5 !text-mmd"
? "overflow-auto p-0 px-2 pt-0.5 !text-base font-medium"
: "px-2 py-0.5",
inputClassName,
)}
Expand Down
42 changes: 18 additions & 24 deletions src/frontend/src/CustomNodes/NoteNode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import NodeDescription from "../GenericNode/components/NodeDescription";
import NoteToolbarComponent from "./NoteToolbarComponent";

const CHAR_LIMIT = 2500;
const DEFAULT_WIDTH = 324;
const DEFAULT_HEIGHT = 324;
const DEFAULT_WIDTH = NOTE_NODE_MIN_WIDTH;
const DEFAULT_HEIGHT = NOTE_NODE_MIN_HEIGHT;

function NoteNode({
data,
Expand All @@ -31,23 +31,21 @@ function NoteNode({
(key) => key === data.node?.template.backgroundColor,
) ?? Object.keys(COLOR_OPTIONS)[0];
const nodeDiv = useRef<HTMLDivElement>(null);
const [_resizedNote, setResizedNote] = useState(false);
const currentFlow = useFlowStore((state) => state.currentFlow);
const setNode = useFlowStore((state) => state.setNode);
const [isResizing, setIsResizing] = useState(false);

const nodeData = useMemo(
() => currentFlow?.data?.nodes.find((node) => node.id === data.id),
[currentFlow, data.id],
);

const nodeDataWidth = useMemo(
() => nodeData?.measured?.width ?? DEFAULT_WIDTH,
[nodeData?.measured?.width],
() => nodeData?.width ?? DEFAULT_WIDTH,
[nodeData?.width],
);
const nodeDataHeight = useMemo(
() => nodeData?.measured?.height ?? DEFAULT_HEIGHT,
[nodeData?.measured?.height],
() => nodeData?.height ?? DEFAULT_HEIGHT,
[nodeData?.height],
);

const dataId = useMemo(() => data.id, [data.id]);
Expand All @@ -67,7 +65,7 @@ function NoteNode({
};
});
}, 5),
[],
[data.id, setNode],
);

const [editNameDescription, set] = useAlternate(false);
Expand All @@ -87,37 +85,32 @@ function NoteNode({
return (
<>
<NodeResizer
minWidth={Math.max(DEFAULT_WIDTH, NOTE_NODE_MIN_WIDTH)}
minHeight={Math.max(DEFAULT_HEIGHT, NOTE_NODE_MIN_HEIGHT)}
minWidth={NOTE_NODE_MIN_WIDTH}
minHeight={NOTE_NODE_MIN_HEIGHT}
maxWidth={NOTE_NODE_MAX_WIDTH}
maxHeight={NOTE_NODE_MAX_HEIGHT}
onResize={(_, params) => {
const { width, height } = params;
debouncedResize(width, height);
}}
isVisible={selected}
lineClassName="!border !border-muted-foreground"
onResizeStart={() => {
setResizedNote(true);
setIsResizing(true);
}}
onResizeEnd={() => {
setIsResizing(false);
debouncedResize.flush();
}}
isVisible={selected}
lineClassName="!border !border-muted-foreground"
/>
<div
data-testid="note_node"
style={{
minWidth: nodeDataWidth,
minHeight: nodeDataHeight,
width: nodeDataWidth,
height: nodeDataHeight,
backgroundColor: COLOR_OPTIONS[bgColor] ?? "#00000000",
}}
ref={nodeDiv}
className={cn(
"relative flex h-full w-full flex-col gap-3 rounded-xl p-3",
"duration-200 ease-in-out",
!isResizing && "transition-transform",
"transition-transform",
COLOR_OPTIONS[bgColor] !== null &&
`border ${!selected && "-z-50 shadow-sm"}`,
)}
Expand All @@ -129,15 +122,16 @@ function NoteNode({
height: "100%",
display: "flex",
overflow: "hidden",
maxHeight: "100%",
}}
className={cn(
"flex-1 duration-200 ease-in-out",
!isResizing && "transition-[width,height]",
"transition-[width,height]",
)}
>
<NodeDescription
inputClassName={cn(
"border-0 ring-0 focus:ring-0 resize-none shadow-none rounded-sm h-full min-w-full",
"border-0 ring-0 focus:ring-0 resize-none shadow-none rounded-sm h-full min-w-full max-h-full overflow-auto",
COLOR_OPTIONS[bgColor] === null
? ""
: "dark:!ring-background dark:text-background",
Expand All @@ -146,7 +140,7 @@ function NoteNode({
COLOR_OPTIONS[bgColor] === null
? "dark:prose-invert"
: "dark:!text-background",
"min-w-full",
"min-w-full max-h-full overflow-auto",
)}
style={{ backgroundColor: COLOR_OPTIONS[bgColor] ?? "#00000000" }}
charLimit={CHAR_LIMIT}
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/constants/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ export const DRAG_EVENTS_CUSTOM_TYPESS = {
"text/plain": "text/plain",
};

export const NOTE_NODE_MIN_WIDTH = 324;
export const NOTE_NODE_MIN_HEIGHT = 324;
export const NOTE_NODE_MIN_WIDTH = 260;
export const NOTE_NODE_MIN_HEIGHT = 100;
export const NOTE_NODE_MAX_HEIGHT = 800;
export const NOTE_NODE_MAX_WIDTH = 1000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ export default function Page({
id: newId,
type: "noteNode",
position: position || { x: 0, y: 0 },
width: NOTE_NODE_MIN_WIDTH,
height: NOTE_NODE_MIN_HEIGHT,
data: {
...data,
id: newId,
Expand Down Expand Up @@ -787,6 +789,7 @@ export default function Page({
backgroundColor: `${shadowBoxBackgroundColor}`,
opacity: 0.7,
pointerEvents: "none",
borderRadius: "12px",
// Prevent shadow-box from showing unexpectedly during initial renders
display: "none",
}}
Expand Down
46 changes: 46 additions & 0 deletions src/frontend/tests/core/unit/sticky-notes-constants.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { expect, test } from "../../fixtures";

test(
"sticky notes constants should be properly defined",
{ tag: ["@release", "@workspace"] },

async ({ page }) => {
const constants = await page.evaluate(() => ({
expectedMinWidth: 260,
expectedMinHeight: 100,
expectedMaxWidth: 1000,
expectedMaxHeight: 800,
}));

expect(constants.expectedMinWidth).toBe(260);
expect(constants.expectedMinHeight).toBe(100);
expect(constants.expectedMaxWidth).toBe(1000);
expect(constants.expectedMaxHeight).toBe(800);
},
Comment on lines 8 to 19
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Test never asserts the real constants.

page.evaluate just returns literal numbers and the test asserts those same literals, so the test will keep passing even if NOTE_NODE_MIN_WIDTH/HEIGHT/MAX_* change again. Import the constants (or read them from the built bundle) and compare against the expected values to give this test any value.

🤖 Prompt for AI Agents
In src/frontend/tests/core/unit/sticky-notes-constants.spec.ts around lines 8 to
19, the test currently uses page.evaluate to return hard-coded numeric literals
and then asserts those same literals, so it never verifies the real exported
constants; change the test to load the actual constants (either import them from
the source module under test or have page.evaluate read them from the built
bundle/window if the bundle exposes them) and then assert those imported/read
values equal the expected numbers (expectedMinWidth=260, expectedMinHeight=100,
expectedMaxWidth=1000, expectedMaxHeight=800) so the test will fail if the real
NOTE_NODE_MIN_WIDTH/HEIGHT/MAX_* values change.

);

test(
"sticky notes should use text-base font size",
{ tag: ["@release", "@workspace"] },

async ({ page }) => {
const textSize = await page.evaluate(() => {
const testEl = document.createElement("div");
testEl.className = "text-base font-medium";
testEl.style.visibility = "hidden";
document.body.appendChild(testEl);

const style = window.getComputedStyle(testEl);
const result = {
fontSize: style.fontSize,
fontWeight: style.fontWeight,
};

document.body.removeChild(testEl);
return result;
});

expect(textSize.fontSize).toBe("16px");
expect(textSize.fontWeight).toBe("400");
},
Comment on lines 27 to 45
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Expect medium font weight (500).

font-medium resolves to a font-weight of 500, yet the assertion expects 400. Update the expectation (and ideally assert the actual constant rather than magic numbers) so the test matches the intended typography.

🤖 Prompt for AI Agents
In src/frontend/tests/core/unit/sticky-notes-constants.spec.ts around lines 27
to 45, the test asserts fontWeight "400" but the Tailwind class "font-medium"
resolves to 500; update the assertion to expect "500" and replace the
magic-number assertions with references to the typography constant used by the
app (import the constant and assert textSize.fontWeight ===
TYPOGRAPHY.MEDIUM_WEIGHT or equivalent) so the test validates the intended
constant rather than hard-coded values.

);
Loading
Loading