Adds `attr_reader :default` to `FieldRegistry` and `UpdateRegistry`
inside their `class << self` blocks, exposing the pre-built `@default`
instance via `.default`. Updates `InplaceEditFieldComponent` and
`InplaceEditFieldsController` to reference `.default` instead of
the class itself, so the parameter is consistently an instance.
For symmetry with the previous `FieldRegistry` commit: extract the
registry state into instance methods, back the class-method API with a
`@default` instance via `delegate`, and update the spec to use
`described_class.new` so tests are isolated from global state.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
`FieldRegistry` used a single class-level hash, so test registrations
in `field_registry_spec` leaked into other specs depending on run order.
Reproduce with:
bundle exec rspec \
'./spec/components/open_project/common/inplace_edit_field_component_spec.rb[1:1:2]' \
'./spec/lib/open_project/inplace_edit/field_registry_spec.rb[1:2:1]' \
--seed 50000
Fix: extract the registry into an instance (`FieldRegistry#register`,
`#fetch`), with a `@default` instance backing the existing class-method
API. The spec now uses `described_class.new` for a clean slate per
example, so the global default is never touched.