Skip to content

feat(native): complete AP-SERVERCFG and ST-PROJECTS parity - #431

Merged
rynfar merged 3 commits into
nativefrom
nw/f5-servercfg-projects
Nov 19, 2026
Merged

rynfar merged 3 commits into
nativefrom
nw/f5-servercfg-projects

Conversation

@rynfar

@rynfar rynfar commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #185
Refs #10, #252

Summary

Closes all remaining applicable web-parity gaps for AP-SERVERCFG and ST-PROJECTS in apps/native, bringing both rows to done in apps/native/parity/LEDGER.md.

Changes

AP-SERVERCFG

  • crates/core/src/settings/shared.rs & crates/core/src/settings/mod.rs: Ported SHARED_SERVER_SETTING_KEYS, split_shared_server_patch, is_model_selection_provider_enabled (text generator precedence + provider fallback), filter_shared_server_patch (driver-compatibility + target enabled check + continueThreadsAfterServerUpdate omit when target settings are absent), and supports_shared_settings_sync.
  • crates/core/src/server_config.rs & crates/core/src/server_config/tests.rs:
    • Added without_environment_themes, ServerConfigState::from_cached, ServerConfigState::is_live, environment_themes_received, and EnvironmentCapabilities (environment_themes, provider_workspace_snapshots_on_demand, server_self_update_progress).
    • Added the 4 ServerSettings default theme/appearance contract fields (default_theme, default_theme_set_at, default_appearance, default_appearance_set_at) with lenient decoding for AP-THEME sibling coordination.
    • Added catalog_digest/loaded_catalog_digest, with_held_provider_catalogs, apply_fetched_machine_catalogs, ServerProviderDelta / apply_server_provider_deltas, ServerConfigStreamEvent::ProviderStatusDeltas, and resolve_shortcut_keybindings.
  • crates/client/src/supervisor.rs: Treated both omitted and null fields in providerStatusDeltas as inherited from held provider catalogs and dropped unrebuildable delta entries.
  • crates/app/src/settings/store.rs: Added multi-environment shared server settings fan-out (send_active_with_shared_fanout) splitting shared vs local patches, filtering per connected secondary environment with settings:write, applying replies to fleet & active ServerConfigState, and reporting partial failures with failed + saved environment labels.
  • crates/app/src/app_state.rs: Wired resolve_shortcut_keybindings fallback when primary config is unavailable, routed ScopedRouteAction::ProjectSettings via open_scoped_project, and added invalidate_project_favicons (matching refreshProjectFaviconUrl in apps/web/src/state/assets.ts).

ST-PROJECTS

  • crates/core/src/settings/projects/{lucide.rs,lucide_catalog.tsv,picker.rs} & crates/core/src/settings/projects.rs: Shipped the full 1,671-icon Lucide 0.564.0 catalog + 251 deprecated/digit aliases with 24×24 SVG rendering (stroke-width="1.75") and alias resolution for popular icons (code-2, globe-2, layers-3).
  • crates/app/src/project_icon.rs: Rendered non-builtin Lucide icons via a bounded thread-local cached Arc<gpui::Image> (ImageFormat::Svg, max 512 entries keyed by (canonical_name, rgba)), falling back to FolderCode only for unknown future names.
  • crates/app/src/settings/project_icon_picker.rs: Exposed all 1,671 searchable Lucide icons, removed the 167-icon limitation banner, required local/primary env + existing directory for local file browse, and matched ProjectFaviconPickerDialog.tsx copy.
  • crates/app/src/new_thread.rs: Added "Project settings" context-menu entries on the non-scratch draft hero project heading (open_project_settings_for_draft) and on every project row in the draft hero picker (open_project_settings_for_entry, supporting both active and non-active environments without switching environments).
  • crates/app/src/settings/{mod,projects,project_actions}.rs: Added open_scoped_project(environment_id, project_id), machine/checkout scope filtering on Shown (preserving all_targets for Pin/Archive and computing has_other_members for danger copy), "Show all environments" button on hidden scoped projects, model_trait_controls effort/traits picker + mixed-model status in New threads, and favicon invalidation on favicon file updates.

Ledger

  • apps/native/parity/LEDGER.md: Updated ONLY ST-PROJECTS (partial #185 -> done) and AP-SERVERCFG (partial #10, #252 -> done; #252 remains on AP-THEME).

Verification

  • cargo clippy --workspace --all-targets -- -D warnings: pass (0 warnings)
  • cargo build -p t3-native: pass
  • cargo test -p t3-core server_config -- --test-threads=1: 10/10 passed
  • cargo test -p t3-core settings::shared -- --test-threads=1: 5/5 passed
  • cargo test -p t3-core settings::projects -- --test-threads=1: 19/19 passed
  • cargo test -p t3-client -- --test-threads=1: 151/151 passed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot project_icon -- --test-threads=1: 1/1 passed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot settings::store -- --test-threads=1: 5/5 passed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot settings::projects -- --test-threads=1: 2/2 passed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot settings::project_actions -- --test-threads=1: 1/1 passed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot new_thread -- --test-threads=1: 8/8 passed
  • vp fmt --check apps/native/parity/LEDGER.md: pass
  • node --test apps/native/parity/sync.test.ts: 47/47 passed
  • gen-theme.ts --check: skipped in bare worktree without apps/web/node_modules (no theme/token files modified)

Model: Antigravity (f5-servercfg-projects)

Closes remaining web-parity gaps for AP-SERVERCFG (Refs #10, #252) and ST-PROJECTS (Closes #185):

- AP-SERVERCFG:
  - Port splitSharedServerPatch / filterSharedServerPatch / isModelSelectionProviderEnabled / supportsSharedSettingsSync in crates/core/src/settings/shared.rs and fan out shared server settings patches across connected secondary environments in crates/app/src/settings/store.rs (keeping local settings scoped and reporting partial failures).
  - Port withoutEnvironmentThemes cache scrub, ServerConfigState::from_cached / is_live, ProviderStatusDeltas + held on-demand provider catalogs, resolve_shortcut_keybindings authority, and environment_themes_received + default_theme/default_appearance ServerSettings decode in crates/core/src/server_config.rs and crates/client/src/supervisor.rs.
  - Wire primary/connected shortcut fallback and project favicon cache invalidation in crates/app/src/app_state.rs.
- ST-PROJECTS:
  - Ship full 1,671-icon Lucide 0.564.0 catalog + 251 deprecated/digit aliases in crates/core/src/settings/projects/lucide.rs + lucide_catalog.tsv, bounded cached SVG rendering in crates/app/src/project_icon.rs, and full search + local-env browse guard + ProjectFaviconPickerDialog copy in crates/app/src/settings/project_icon_picker.rs.
  - Add DraftHero heading and active/non-active environment picker Project settings entries in crates/app/src/new_thread.rs routed via open_scoped_project.
  - Add machine/checkout scope filtering, has_other_members danger copy, Show all environments empty state, model trait controls, and favicon invalidation in crates/app/src/settings/{mod,projects}.rs.
- Update AP-SERVERCFG and ST-PROJECTS rows to done in apps/native/parity/LEDGER.md.

Model: Antigravity (f5-servercfg-projects)
…PROJECTS

Addresses all 4 review findings on PR #431:

1. Wire project default model trait controls in crates/app/src/settings/projects.rs directly through set_project_model / save_project_override so scratch projects (and all project targets) save projectSettingsOverrides.<id>.defaultModelSelection with project_model_unavailable checks instead of mutating global defaultModelSelection; add scratch-project GPUI test.
2. Enforce requiredScopesForServerSettingsPatch (crates/core/src/settings/shared.rs) upfront on the active environment in send_active_with_shared_fanout (and per target in send_scoped_environments), and report denied connected secondary environments in the partial failure summary instead of silently skipping; extend store.rs GPUI tests.
3. Add AppState::sync_shortcut_keybindings in crates/app/src/app_state.rs (invoked on reset, install_active_environment, and apply_fleet_view) to install [] (defaults) whenever authoritative resolved keybindings are None, clearing stale custom keybindings when switching to a loading primary or disconnecting the last fallback; add GPUI test.
4. Update AP-SERVERCFG in apps/native/parity/LEDGER.md to state accurately what is wired live at runtime vs ready core helpers (native matches web without mobile's providerCatalogsOnDemand or a disk ServerConfig cache).

Model: Antigravity (f5-servercfg-projects)
…ject trait test

Awaits AppEvent::ServerConfig via oneshot and drains cx.run_until_parked() before cx.shutdown() / cx.clear_globals() so send_projects finishes send_next(cx) while ClientPrefs is still registered.

Model: Antigravity (f5-servercfg-projects)
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