ref(forms): migrate projectFiltersSettings to scraps form system#115783
Conversation
|
bugbot run |
📊 Type Coverage Diff
🔍 2 new type safety issues introducedType assertions (
This is informational only and does not block the PR. |
|
This is flickering a bit Screen.Recording.2026-05-20.at.12.29.26.mov |
…gate The IP address filter (filters:blacklisted_ips) was incorrectly moved inside the projects:custom-inbound-filters Feature wrapper during the form migration. In master it was rendered by the parent JsonForm, outside the feature gate. Move it back outside so it remains visible for all projects regardless of the feature flag. Add a test to prevent regression. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
I’ve done this the same way as we have it in Teams settings:
It’s consistent with other messages:
I don’t understand what you mean with “update the copy as well”. Please elaborate what you think should be done differently.
Yeah it’s flickering because the toggles disable while the mutation is in-flight but the mutation is very fast here. We could change it for this instance but I’d like to avoid race conditions because users click multiple toggles fast.
done: e0c5b5a
good point, not sure what they were there for in the first place: e471789, 732dc3d |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dd29cb3. Configure here.
the org slug flow was probably migrated 1:1 from the old flow. I think we’ve agreed that showing cancel/save buttons after typing something in is not the flow we want. Either fields auto-save, or they have a consistent save/cancel button shown with a message next to them. We can flex the message to take the full width but right now, messages next to save/cancel don’t have that. Happy to streamline in a follow-up.
Hmm we already have a banner at the top saying “These settings can only be edited by users with the organization-level owner, manager, or team-level admin roles.” so adding another disabled button doesn’t really help here I believe
yeah I changed UX a little bit here because again, those save/cancel buttons popping in per row is not what we want. |
…5783) Migrates the project inbound filters settings page from the legacy form system (`Form`, `JsonForm`, `FormField`, `FieldFromConfig`) to the new scraps form system (`AutoSaveForm`, `useScrapsForm`, `FieldGroup`). **Standard filter toggles & legacy browser filter** Each filter toggle (browser-extensions, localhost, web-crawlers, etc.) is now an `AutoSaveForm` with `field.Switch`. The legacy browser filter uses `AutoSaveForm` with a `string[]` field value and a custom `field.Base` render for the browser grid UI. Both share mutation options via a `getFilterMutationOptions` factory. Optimistic updates go through the filter list query cache instead of local `useState`, so `AutoSaveForm`'s reset-after-save works correctly across rapid toggles. **Project-level boolean filters** Hydration errors and ChunkLoadError toggles use `AutoSaveForm` backed by the detailed project query cache. Optimistic updates write to both the query cache and `ProjectsStore` to keep the sidebar and other consumers in sync. **Custom filter textareas** The `saveOnBlur: false` textarea fields (IP addresses, releases, error messages, etc.) are unified into a single `useScrapsForm` with explicit Save/Cancel buttons, replacing the old `JsonForm` + `inboundFilters.tsx` config. `inboundFilters.tsx` is deleted since it was only imported here. **FormSearch & field registry** Wraps the migrated forms with `FormSearch` for settings search indexing and regenerates `generatedFieldRegistry.ts`. Refs DE-985 --------- Co-authored-by: Claude Opus 4 <noreply@anthropic.com>












Migrates the project inbound filters settings page from the legacy form system (
Form,JsonForm,FormField,FieldFromConfig) to the new scraps form system (AutoSaveForm,useScrapsForm,FieldGroup).Standard filter toggles & legacy browser filter
Each filter toggle (browser-extensions, localhost, web-crawlers, etc.) is now an
AutoSaveFormwithfield.Switch. The legacy browser filter usesAutoSaveFormwith astring[]field value and a customfield.Baserender for the browser grid UI. Both share mutation options via agetFilterMutationOptionsfactory. Optimistic updates go through the filter list query cache instead of localuseState, soAutoSaveForm's reset-after-save works correctly across rapid toggles.Project-level boolean filters
Hydration errors and ChunkLoadError toggles use
AutoSaveFormbacked by the detailed project query cache. Optimistic updates write to both the query cache andProjectsStoreto keep the sidebar and other consumers in sync.Custom filter textareas
The
saveOnBlur: falsetextarea fields (IP addresses, releases, error messages, etc.) are unified into a singleuseScrapsFormwith explicit Save/Cancel buttons, replacing the oldJsonForm+inboundFilters.tsxconfig.inboundFilters.tsxis deleted since it was only imported here.FormSearch & field registry
Wraps the migrated forms with
FormSearchfor settings search indexing and regeneratesgeneratedFieldRegistry.ts.Refs DE-985