Skip to content

Improve FeatureFramework quality-of-life ergonomics - #4

Draft
remdui wants to merge 6 commits into
mainfrom
agent/featureframework-qol
Draft

Improve FeatureFramework quality-of-life ergonomics#4
remdui wants to merge 6 commits into
mainfrom
agent/featureframework-qol

Conversation

@remdui

@remdui remdui commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

Repository-wide, compatibility-preserving quality-of-life pass across FeatureFramework. The repository was reviewed repeatedly across API, core, toolkit, theme support, Paper, Velocity, integrations, processor, testkits, examples/docs, acceptance fixtures, build scripts, and CI. The changes intentionally avoid architectural churn and focus on recurring developer friction, safer external input, read-only diagnostics, composability, and small allocation/correctness improvements.

Identifiers and public runtime API

  • add exception-free FeatureId.isValid(...) / FeatureId.tryParse(...)
  • add matching safe parsing to ServerId, ThemeId, and ThemeItemId
  • make FeatureCatalog.findByName(...) safe for null/malformed external input
  • add FeatureSnapshot.active() / failed()
  • add CapabilityRegistry.findCapability(...), requireCapability(...), and hasCapability(...) while retaining reload-safe references
  • trim external feature names in the feature command model

Feature, resource, and service composition

  • add bulk FeatureCollection.Builder.features(...) and FeatureCollection.size()
  • cache immutable effective feature roles instead of rebuilding derived sets on repeated reads
  • add exact-key/resource key snapshots plus size/empty introspection to FeatureResourceExtensions
  • add availability/type snapshots plus size/empty introspection to InternalServiceRegistry
  • add bulk resource-contributor registration to both Paper and Velocity host builders
  • add removable FeatureConfigHandler.subscribeReload(...) subscriptions alongside the existing listener API
  • add missing-dependency presence/count helpers to DependencyCheckResult

Themes

  • cache immutable theme/item list snapshots instead of allocating them repeatedly
  • add Theme.size() and ThemeRegistry.size()
  • add ThemeRegistry.Builder.include(...)
  • allow existing ThemeItem instances and batches to be reused directly through Theme.Builder

Configuration and storage QoL

  • add ConfigMap.putAll(...), size(), and isEmpty()
  • add ConfigNode map/list shape checks, size(), and optional typed reads
  • add ConfigView.contains(...), optional typed reads, atomic putAll(...), and batch putAll(...)
  • add feature/local-data path validation helpers without tightening existing accepted paths
  • expose YamlFile.path(), optional load-failure diagnostics, and load-failure state
  • expose ConfigService.isCached(...), cached file count, and immutable cached-path snapshots

Cache, HTTP, token, and text toolkit QoL

  • add typed/raw cache-value lookup, contains/size/empty helpers, deterministic expiration checks, and bulk builder input
  • add optional/contains conveniences to FileCacheStore
  • fix persisted cache expiration consistency: non-positive expiration timestamps now remain non-expiring in JsonCacheFile, matching CacheValue
  • add AsyncHttpTransport.postJson(...)
  • add HTTP redirect/client-error/server-error/error classification helpers
  • cache the empty MessagePlaceholders instance and add contains/size/empty/map/apply conveniences
  • widen TokenService loaders to CompletionStage, add an infinite-token convenience overload, explicit cleanup/clear, namespace, and empty-state helpers
  • add TokenResult.isOk() / payloadOptional()
  • expose Language.code(), safe case-insensitive Language.fromCode(...), and cache the immutable localizable-language list
  • add pagination navigation helpers (hasPrevious, hasNext, isFirst, isLast, previousPage, nextPage)

DataRegistry and DataProvider ergonomics

  • add optional snapshot helpers and primitive playerId() convenience to PlayerReference
  • add public active identifier lookup and null-safe readiness to PlayerIdentityResolver
  • add symmetric username/player-id reference lookups, including async variants, to PlayerReferenceResolver
  • make DataProviderResources AutoCloseable
  • expose bound-feature state plus immutable connection/ORM identifier snapshots and active counts
  • add direct connection/ORM presence checks without exposing mutable resource maps

Testkit

  • add empty-handler InterfaceProxy.of(Class) and clearer upfront interface validation
  • add test filesystem directory/read helpers
  • expand focused API/core/toolkit/cache/config/DataRegistry/DataProvider contract coverage

Compatibility

  • additive public API only except internal implementation optimizations/correctness alignment
  • no removed or renamed existing methods
  • no package moves
  • no changed existing return types
  • no stricter existing validation or changed defaults
  • no lifecycle, platform-threading, scheduling, database, or resource-ownership model changes
  • avoided ambiguous overloads such as find(String) next to find(FeatureId)
  • retained existing behaviors such as ServerId.optional(...) and mutable ConfigMap collection views
  • TokenService's loader widening remains source/binary compatible at erasure and accepts existing CompletableFuture suppliers

Validation

  • CI Lint / Checkstyle / ShellCheck: passed
  • full Maven verify: passed
  • Paper and Velocity platform acceptance: passed
  • no open PR conversation comments or unresolved review threads

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