Skip to content

feat(miyo): add customizable vault name setting#2311

Merged
wenzhengjiang merged 4 commits intomasterfrom
feat/miyo-vault-name-setting
Mar 19, 2026
Merged

feat(miyo): add customizable vault name setting#2311
wenzhengjiang merged 4 commits intomasterfrom
feat/miyo-vault-name-setting

Conversation

@wenzhengjiang
Copy link
Collaborator

Summary

  • Adds a miyoVaultName setting that lets users set a custom name for their vault in Miyo, overriding the auto-detected vault filesystem path
  • The Vault Name field appears before the Enable Miyo toggle so users can set it up first
  • When changed while Miyo is already enabled, clears the old index and triggers a full re-index under the new name; cancelling the confirmation resets the input
  • Description explains the purpose, instructs users to set it before enabling Miyo, and notes that remote/multi-device users must use the same name on every device to share the same index

Test plan

  • With Miyo disabled: set a vault name → clicks Apply → saves silently, no modal
  • With Miyo enabled: change vault name → Apply → confirmation modal appears with old source ID → confirm → old index cleared, new name saved, re-index triggered
  • Cancel the confirmation → input resets to the previously saved value
  • Leave vault name blank → getMiyoSourceId falls back to vault path as before
  • Set vault name, disable + re-enable Miyo → indexing uses the custom name as source ID
  • Remote setup: use the same vault name on two devices → both index under the same source ID in Miyo

🤖 Generated with Claude Code

Allows users to set a custom vault name that Miyo uses as the source ID
for indexing, instead of the auto-detected vault path. When changed while
Miyo is enabled, clears the old index and triggers a full re-index under
the new name. Includes guidance for remote/multi-device setups to use a
consistent vault name across devices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 713954adb6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +109 to +110
const oldName = (settings.miyoVaultName || "").trim();
if (newName === oldName) return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare effective source IDs before forcing reindex

This checks newName vs oldName (the raw override values) instead of comparing the resolved source IDs, so when the saved override is blank and the user enters the auto-detected value (vault path/name), the code treats it as a change and still clears the existing index plus triggers a full re-index. In that case the effective Miyo source ID is unchanged, so this causes unnecessary destructive work and avoidable indexing downtime for large vaults.

Useful? React with 👍 / 👎.

wenzhengjiang and others added 2 commits March 19, 2026 10:24
… name change

Avoids unnecessary index clear and full re-index when the user types the
auto-detected vault path (the value that the blank field resolves to),
since the effective Miyo source ID is unchanged in that case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Apply button is hidden when the input is blank, and the handler
guards against an empty string, so users cannot accidentally clear
the vault name and submit it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wenzhengjiang
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12e75c7294

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

*/
const handleVaultNameApply = async () => {
const newName = pendingVaultName.trim();
if (!newName) return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow clearing Vault Name to restore auto-detected source

handleVaultNameApply returns immediately when the trimmed input is empty, so a user who already saved miyoVaultName cannot clear it to go back to the default auto-detected vault path/name. That makes the override effectively irreversible from this UI and conflicts with the setting text that says leaving it blank should use auto-detection, which can keep indexing under the wrong source ID after vault moves or namespace changes.

Useful? React with 👍 / 👎.

An empty vault name is valid — it falls back to the auto-detected vault
path as the Miyo source ID. Removes the empty-string guard so users can
clear a previously set name and revert to the default behaviour.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wenzhengjiang
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@wenzhengjiang wenzhengjiang merged commit ddb16af into master Mar 19, 2026
2 checks passed
@wenzhengjiang wenzhengjiang deleted the feat/miyo-vault-name-setting branch March 19, 2026 01:57
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