Skip to content

refactor(ui): Simplify state observation in ChatView component - #739

Merged
haiphucnguyen merged 1 commit into
mainfrom
feature/improvements
Sep 28, 2026
Merged

haiphucnguyen merged 1 commit into
mainfrom
feature/improvements

Conversation

@haiphucnguyen

Copy link
Copy Markdown
Collaborator
  • Updates state handling logic for chat view components.
  • Refactors the use of rememberUpdatedState for improved state lifecycle management.
  • Consolidates various session and loading states into the observation scope.

Summary

Related Issue(s)

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactor (no functional change)
  • 🧪 Tests
  • 🔧 Chore / tooling / CI

What Changed & Why

How to Test

./gradlew test

Screenshots / Recordings (if applicable)

Checklist

  • I have read the CONTRIBUTING guide
  • My branch is up to date with main
  • I ran ./gradlew spotlessApply and ./gradlew detekt locally
  • I ran ./gradlew test and all tests pass
  • I added/updated tests for my changes (if applicable)
  • I added/updated documentation (if applicable)
  • My commits are signed off (DCO) — git commit -s
  • This PR is focused on a single feature/fix

Additional Notes

- Updates state handling logic for chat view components.
- Refactors the use of `rememberUpdatedState` for improved state lifecycle management.
- Consolidates various session and loading states into the observation scope.
Copilot AI lite review requested due to automatic review settings September 28, 2026 06:56
@haiphucnguyen
haiphucnguyen merged commit ca341dd into main Sep 28, 2026
10 of 11 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/improvements branch September 28, 2026 06:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Preserve current state propagation by retaining state holders or moving dereferencing into the movable content.

Review effort: Lite
Findings: None

What changed in this PR

Refactors ChatView state observation for the movable chat input content.

Changes:

  • Consolidates state observation.
  • Adds context-size learning state.
  • Removes duplicated observers.
File Summary
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​chat/​ChatView.kt Refactors chat input state observation; captured values may become stale inside remembered movable content.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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