Skip to content

feat(graph+ux): auto-commit edges, mobile fixes, responsive navbar#83

Merged
RaggedR merged 2 commits intomainfrom
feat/graph-auto-edges-mobile-ux
Mar 3, 2026
Merged

feat(graph+ux): auto-commit edges, mobile fixes, responsive navbar#83
RaggedR merged 2 commits intomainfrom
feat/graph-auto-edges-mobile-ux

Conversation

@RaggedR
Copy link
Copy Markdown
Owner

@RaggedR RaggedR commented Mar 3, 2026

Summary

  • Graph exploration: clicking a stub to add a node now auto-discovers and commits all edges between that node and existing committed nodes (batch undo/redo)
  • Mobile graph: fix race condition where zoomToFit ran at default 800×600 before ResizeObserver corrected to actual mobile dimensions; responsive force parameters (tighter layout on small screens)
  • Responsive navbar: mobile three-dot menu replaces nav links that scrolled off-screen
  • UserMenu SSR: loading state renders a clickable "Sign In" link instead of an invisible empty div
  • ImageUpload UX: remove confusing Upload/URL mode toggle — drop zone always visible with "or paste image URL" link

Test plan

  • All subgraph E2E tests pass (14/14)
  • All auth E2E tests pass (10/10)
  • TypeScript type-check clean
  • Manual: verify graph exploration auto-discovers edges on stub click
  • Manual: verify mobile graph renders all nodes on first load
  • Manual: verify mobile navbar three-dot menu works

🤖 Generated with Claude Code

Graph exploration: clicking a stub to add a new node now auto-discovers
and commits all edges between that node and existing committed nodes.
Batch commit/undo so the whole set is a single undo action.

Mobile graph: fix race condition where zoomToFit ran at default 800x600
before ResizeObserver corrected to actual mobile dimensions. Responsive
force parameters (tighter layout on small screens).

Navbar: responsive mobile menu with three-dot toggle — nav links were
scrolling off-screen on mobile. Single UserMenu instance for Playwright
compatibility.

UserMenu: SSR loading state now renders a clickable "Sign In" link
instead of an invisible empty div.

ImageUpload: remove confusing Upload/URL mode toggle — drop zone is
always visible, with a small "or paste image URL" link below.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ghost
ghost previously approved these changes Mar 3, 2026
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Code Review - PR #83

Summary: Adds auto-discovery of edges when expanding the graph, fixes mobile graph rendering, and improves mobile navbar/upload UX.

Changes reviewed:

  • Graph exploration: auto-commit all edges between a newly added node and existing committed nodes (batch undo/redo)
  • Mobile graph fix: re-zoom after ResizeObserver corrects dimensions, responsive force parameters
  • Responsive navbar: three-dot mobile menu replaces scrolling nav links
  • UserMenu SSR: loading state renders clickable "Sign In" link instead of invisible div
  • ImageUpload: simplified UX — always-visible drop zone with "or paste URL" fallback

Quality Assessment:

Aspect Status Notes
Code Quality pass Clean, well-structured changes with good comments
Tests pass 24/24 tests pass (subgraph + auth), TypeScript clean
Security pass No new auth surfaces or user input handling
Performance pass Edge auto-discovery is O(links) which is acceptable for this graph size

Issues found:

  • GraphView.tsx:226: The dependency [dimensions.width < 600] is a computed boolean expression in a dependency array. React will compare the boolean result which works correctly, but the eslint-disable comment papers over a legitimate warning. Use a derived isMobile state variable or useMemo instead of putting a comparison expression directly in the deps array.

Suggestions:

  • GraphView.tsx:207: The magic-number check prev.width === 800 && prev.height === 600 to detect "initial default dimensions" is brittle — if the default ever changes, this silently breaks. Consider using a ref boolean like hasReceivedRealDimensions instead.
  • Navbar.tsx: The mobile dropdown doesn't close when the user taps outside of it (unlike the UserMenu which has an outside-click listener). On mobile this could be annoying — consider adding a click-outside handler or a semi-transparent backdrop that closes the menu.

Verdict: APPROVE

Core logic is solid — the batch commit/undo pattern in useSubgraphExploration is well-designed and the edge auto-discovery in handlePointerDown correctly handles the full graph scan. The mobile fixes directly address real usability issues. The suggestions above are minor polish items.

- Replace computed boolean in deps array with derived `isMobile` variable
- Replace magic-number default check with `hasRealDimensionsRef` boolean
- Add click-outside handler to close mobile navbar dropdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@RaggedR RaggedR dismissed ghost ’s stale review via a42ad8b March 3, 2026 12:05
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Re-review - PR #83 (round 2)

All three items from round 1 have been addressed:

  1. Fixed: dimensions.width < 600 in dependency array → derived isMobile variable at component top level, used in useEffect deps
  2. Fixed: Magic-number 800x600 check → hasRealDimensionsRef boolean that flips once ResizeObserver fires
  3. Fixed: Mobile navbar click-outside → useEffect with mousedown listener on navRef, only active when mobileOpen is true

No new issues or suggestions. Clean code.

Verdict: APPROVE

@RaggedR RaggedR merged commit 79ec3ec into main Mar 3, 2026
2 checks passed
@RaggedR RaggedR deleted the feat/graph-auto-edges-mobile-ux branch March 3, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant