[PR #12983] refactor: clean up dialog-model.tsx per code review #14460

Closed
opened 2026-02-16 18:19:15 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12983

State: closed
Merged: Yes


Summary

  • Extract duplicated favorite/recent option builder into a toOptions helper (~30 lines of duplication removed)
  • Simplify showExtra memo from branching pattern to single boolean expression
  • Simplify title memo with optional chaining, removing double memo call and ! assertion
  • Remove dead ref signal and unused DialogSelectRef import
  • Inline intermediate variables (q, value aliases) per style guide
  • Use implicit returns in map callbacks for consistency
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12983 **State:** closed **Merged:** Yes --- ## Summary - Extract duplicated favorite/recent option builder into a `toOptions` helper (~30 lines of duplication removed) - Simplify `showExtra` memo from branching pattern to single boolean expression - Simplify `title` memo with optional chaining, removing double memo call and `!` assertion - Remove dead `ref` signal and unused `DialogSelectRef` import - Inline intermediate variables (`q`, `value` aliases) per style guide - Use implicit returns in map callbacks for consistency
yindo added the pull-request label 2026-02-16 18:19:15 -05:00
yindo closed this issue 2026-02-16 18:19:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14460