Skip to content

Conversation

@Arney
Copy link

@Arney Arney commented Jan 2, 2026

No description provided.

index.js Outdated
localStorage.setItem('clay-watch-' + this.meta.watchToken,
JSON.stringify(watchSpecificSettings));
}
localStorage.setItem('clay-settings', JSON.stringify(settings));
Copy link
Member

Choose a reason for hiding this comment

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

Should all of these settings be persisted, or only the settings that aren't specific to the watch? It might be better to retain nothing over a setting from the last watch that was configured

Copy link
Author

Choose a reason for hiding this comment

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

I was in doubt myself. What is the behavior we want when a new watch is encountered.

The current implementation is closest to existing behavior, you inherit the last used settings. But falling back to the defaults would probably be better, also less risk of having an impossible setting based on capabilities (but this should always be verified on the watch side as well).

I'll make the changes.

Store each setting either in a watch specific setting or in a global setting. When no setting is stored for a watch-specific key, clay will use the default value.
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