Skip to content

fix(install): allow modification of preset values on upgrade#558

Open
nillikechatchat wants to merge 2 commits intoagentscope-ai:mainfrom
nillikechatchat:fix/install-script-credentials-editable
Open

fix(install): allow modification of preset values on upgrade#558
nillikechatchat wants to merge 2 commits intoagentscope-ai:mainfrom
nillikechatchat:fix/install-script-credentials-editable

Conversation

@nillikechatchat
Copy link
Copy Markdown
Contributor

Summary

Previously, several step_* functions would skip prompts when values were already set during upgrade scenarios. This prevented users from modifying settings by pressing 'b' to go back and re-enter values.

Fixed Functions

Function Variable Fix
step_admin() HICLAW_ADMIN_PASSWORD Always call prompt_optional for admin password
step_network() HICLAW_LOCAL_ONLY Add upgrade branch for network access mode
step_volume() HICLAW_DATA_DIR Add upgrade branch for data volume
step_workspace() HICLAW_WORKSPACE_DIR Add upgrade branch for workspace directory

Added i18n Messages

  • port.local_only.title_short (网络访问模式 / Network Access Mode)
  • port.local_only.val_local (仅本机 / Local only)
  • port.local_only.val_external (允许外部访问 / External access)
  • data.title_short (数据持久化 / Data Persistence)
  • workspace.title_short (Manager 工作空间 / Manager Workspace)

Test Plan

  1. Run ./install/hiclaw-install.sh with existing configuration (upgrade mode)
  2. Press 'b' to go back to admin, network, volume, or workspace step
  3. Verify that users can modify the previously set values
  4. Confirm that new installations still work correctly

Related

This fix follows the pattern established by step_runtime(), step_e2ee(), step_docker_proxy(), and step_idle() which already handle upgrade scenarios properly.

In step_admin(), step_network(), step_volume(), and step_workspace(),
when variables were already set (e.g., loaded from existing config),
the code would skip the prompt and only print a 'preset' message,
preventing users from modifying these values.

This fix removes the else branches that were skipping prompts, and
always calls prompt_optional() or adds upgrade-aware prompt handling
which correctly handles both new installations and upgrade scenarios
with proper 'back' navigation support.

Co-authored-by: nillikechatchat <yuanhenglizhen2050@163.com>
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