release: v0.1.4 — CLI config bridge + multi-profile support - #8
Merged
Conversation
Fixes a class of silent failures where the dock invoked the CLI but auxiliary lookups (teams, rosters, plugin settings) resolved against the wrong config. Symptom on macOS: "Team profile not found" errors when launched from Finder; publish targets all reporting their flags as disabled even though the chosen config had them enabled. CLI subprocess env - render_via_cli, hook_executor::execute_hook, queue::run_queue_cli_with_profile, and hooks::run_auth_command now export REELN_CONFIG=<path> alongside --config <path>. Auxiliary CLI lookups (team profiles, rosters, secrets) resolve against the chosen config regardless of how the dock was launched. Profile name end-to-end - CliRenderParams.config_profile carries the plugin profile NAME (e.g. "production") so the CLI's --profile flag is set. Without it, add_to_queue stored config_profile="" on the queue item and publish later fell through to defaults. - Tauri commands render_short / render_iteration accept the new parameter; the frontend's renderQueue store passes item.pluginProfile through to the IPC layer. Publish-time recovery - queue_publish / queue_publish_all derive a concrete config.<profile>.json path from the queue item's stored profile via state.effective_config_dir() when the frontend didn't supply one. Fixes Finder-launched instances where REELN_CONFIG isn't inherited from the shell. Tests - 312 cargo tests pass (12 new). Helper derive_config_path_from_profile is exported via super for unit testing without spinning up Tauri State. IPC tests assert configProfile round-trips end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Refactor log store from module-scope ``$state`` + reassign-on-push to a ``LogStore`` class instance with in-place ``entries.push()`` mutation. The previous pattern broke cross-module Svelte 5 reactivity: when ``push()`` reassigned ``entries = [...]``, the LogViewer's $derived that read entries via ``getLogEntries()`` from another module never saw the updates, and on mount the component appeared to render nothing. Class instance pattern is the Svelte 5 docs' recommended approach for shareable reactive state. Property reads on the instance (e.g. ``logStore.visible``) wire up reactivity reliably across module boundaries. Old function exports (getLogEntries, setLogLevel, clearLogs, log.info, etc.) are preserved as thin wrappers so the ~10 existing call sites don't need to change. LogViewer rewritten to read ``logStore.visible`` and ``logStore.minLevel`` directly — the simplest, most reactive form. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a class of silent failures where the dock invoked the CLI but auxiliary lookups (teams, rosters, plugin settings) resolved against the wrong config. Symptoms users saw:
cloudflare upload_video=False,tiktok upload_shorts=False, etc.)Three plumbing fixes get the dock and CLI on the same page:
1. CLI subprocess env
Every CLI subprocess (
render_via_cli,hook_executor::execute_hook,queue::run_queue_cli_with_profile,hooks::run_auth_command) now exportsREELN_CONFIG=<path>alongside--config <path>. The CLI's_config_base_dir()falls back toREELN_CONFIGwhen--configisn't set, so without this fix Finder-launched dock instances resolved teams against~/Library/Application Support/reeln/instead of~/.config/reeln/config/.2. Profile name flows end-to-end
CliRenderParams.config_profilecarries the plugin profile NAME ("production"). The dock passes--profile <name>alongside--config <path>. Without this,add_to_queuestoredconfig_profile=""on the queue item, andreeln queue publishlater fell through to defaults — every plugin saw its enable flag as off.Tauri commands
render_short/render_iterationaccept the new parameter; the frontend'srenderQueuestore passesitem.pluginProfilethrough to the IPC layer.3. Publish-time recovery
queue_publish/queue_publish_allnow derive a concreteconfig.<profile>.jsonpath from the queue item's stored profile viastate.effective_config_dir()when the frontend didn't supply one. Fixes the (common) case where the frontend's in-memory queue cache is stale and_autoResolveItemConfigPathreturnsundefined, but the queue file on disk has the right profile recorded.Test plan
cargo test— 312 tests pass (12 new)test_cli_config_profile_passes_profile_flag— explicit profile →--profile productiontest_cli_empty_or_missing_config_profile_omits_flag— None / "" both suppress the flagtest_derive_config_resolves_existing_profile_file— recovers when frontend omits configtest_derive_config_returns_none_when_file_missing— falls back to--profilefor CLI error reportingtest_cli_config_path_also_exports_reeln_config_env— REELN_CONFIG env exportednpx vitest run— 112 tests pass (2 new IPC round-trip tests)Companion PRs
cache_discoverywarning in dock logs🤖 Generated with Claude Code