Skip to content

[BrushGraph 3/7] Add ViewModel and state management#62

Open
maxmmitchell wants to merge 7 commits intobrush-graph/2-persistencefrom
brush-graph/3-viewmodel
Open

[BrushGraph 3/7] Add ViewModel and state management#62
maxmmitchell wants to merge 7 commits intobrush-graph/2-persistencefrom
brush-graph/3-viewmodel

Conversation

@maxmmitchell
Copy link
Copy Markdown

Description

This is the third PR in the Brush Graph stack. It introduces the state management layer that bridges the data layer with the upcoming UI.

Details

  • BrushGraphUiState: Holds the current graph, selected nodes, camera position, and tutorial state.
  • A tutorial state machine, managed by TutorialManager, listens to user actions (like adding a node) and advances the tutorial state automatically.

Dependencies

  • Target: brush-graph/2-persistence

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot 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

This pull request introduces the BrushGraphViewModel and TutorialManager to handle the logic for a brush graph editor, including node/edge management, tutorial progression, and brush palette persistence. Feedback focuses on optimizing the brush StateFlow to prevent unnecessary re-calculations during UI interactions, improving encapsulation by making internal dependencies private, and removing unused parameters. Additionally, the reviewer suggested replacing println with proper Android logging and simplifying the palette API by removing redundant parameters.

@maxmmitchell maxmmitchell force-pushed the brush-graph/3-viewmodel branch from 5a37541 to a4e196f Compare April 27, 2026 13:24
@maxmmitchell maxmmitchell force-pushed the brush-graph/2-persistence branch 4 times, most recently from 4f5748b to bd61e05 Compare April 28, 2026 05:00
@maxmmitchell maxmmitchell force-pushed the brush-graph/3-viewmodel branch from a4e196f to e17146a Compare April 28, 2026 05:53
@maxmmitchell maxmmitchell marked this pull request as ready for review April 28, 2026 07:58
@maxmmitchell maxmmitchell force-pushed the brush-graph/2-persistence branch from bd61e05 to da9bc38 Compare April 30, 2026 14:28
@maxmmitchell maxmmitchell force-pushed the brush-graph/3-viewmodel branch from e17146a to cc0aecc Compare April 30, 2026 14:54
Copy link
Copy Markdown
Contributor

@cka-dev cka-dev left a comment

Choose a reason for hiding this comment

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

lgtm with comments

@maxmmitchell maxmmitchell force-pushed the brush-graph/2-persistence branch from 257bd46 to c7b9a0d Compare May 1, 2026 19:34
@maxmmitchell maxmmitchell force-pushed the brush-graph/3-viewmodel branch 2 times, most recently from 8157b89 to 4f012bf Compare May 4, 2026 18:28
@maxmmitchell maxmmitchell force-pushed the brush-graph/2-persistence branch 3 times, most recently from 9abf30a to ee09998 Compare May 5, 2026 14:46
@maxmmitchell maxmmitchell force-pushed the brush-graph/3-viewmodel branch from 4f012bf to 4ebcb7e Compare May 5, 2026 20:08
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.

2 participants