Skip to content

refactor: replace FeatureFlip tri-state fork with segmented buttons - #160

Open
MaxMichel2 wants to merge 1 commit into
refactor/devview-shell-ui-kitfrom
refactor/featureflip-segmented-control
Open

MaxMichel2 wants to merge 1 commit into
refactor/devview-shell-ui-kitfrom
refactor/featureflip-segmented-control

Conversation

@MaxMichel2

@MaxMichel2 MaxMichel2 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the custom tri-state fork with labelled Material3 Remote/Off/On choices and supporting remote-value text.
  • Adopt the shared pinned-search/filter panel, active counts, empty-state recovery and saved-state restoration.
  • Preserve saved type filters across registry changes; process saves in click order and recover from failed I/O with Retry.
  • Update module documentation and the code graph.

Dependency and scope

Depends on #159 (informational).
Base and description baseline: refactor/devview-shell-ui-kit. This PR contains only the FeatureFlip layer. Merge order: #157 → #159 → this PR. No history rewriting or gh-stack mutation was performed; squash merges may require a later approved restack.

Validation

  • FeatureFlip host tests and 11 device tests passed.
  • Detekt, Konsist, API compatibility and sample debug build passed.
  • Controls inspected in light/dark local captures; persistence failure/order and restoration regressions covered by tests.
  • Graph reference/uniqueness checks passed; clustered reports/wiki remain from the earlier build.
  • Native iOS execution, TalkBack and enlarged-font checks not performed.

Local roadmap, graph cache/build state and captures are excluded.

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking issue where another save can hide Retry for an earlier failure.

Findings

  1. P2 Failed saves lose Retry ▶

Summary

FeatureFlip replaces its custom remote control with Material3 Remote/Off/On buttons.

  • Remote flags show their source value beside three clear choices.
  • FeatureFlip remembers list filters and helps recover when no flags match.
  • FeatureFlip saves flag changes in click order and offers a retry after a failed save.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[User chooses a flag value] --> B[Ordered queue]
  B --> C[Save named flag]
  C -->|Success| D[Clear current error]
  C -->|I/O failure| E[Show error and Retry]
  E -->|Retry| B
Loading

Reviews (1) · Last reviewed commit: ":lipstick: Replace FeatureFlip tri-state..." · Reviewed by Greptile

Use native Material3 choices, saved filter state and recoverable empty states.
Preserve restored type filters when registrations change and serialize UI saves
so delayed persistence cannot reverse click order. Failed I/O offers Retry
without changing the persisted selection. Refresh the graph and module docs.

Validation: FeatureFlip host tests and 11 device tests passed; Detekt, Konsist,
API compatibility and sample debug build passed. Controls inspected in both
themes. Native iOS execution and accessibility/font-scale checks not performed.
for ((name, state) in changes) {
try {
featureHandler.setFeatureState(featureName = name, state = state)
failedChange = null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Failed saves lose Retry

If flag A fails to save and an already-queued write for flag B succeeds, failedChange = null hides A's error and Retry action. setFeatureState only saved B, so A's change is still unsaved. New clicks also clear the error immediately.

Keep failed changes by feature, and clear each one only after that feature saves successfully or the user dismisses it.

This branch has not been deployed

No deployments
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