Skip to content

fix(ui): call folders folders, and match Obsidian's sentence case in settings - #1562

Merged
chhoumann merged 7 commits into
masterfrom
chhoumann/1552-settings-copy
Jul 27, 2026
Merged

fix(ui): call folders folders, and match Obsidian's sentence case in settings#1562
chhoumann merged 7 commits into
masterfrom
chhoumann/1552-settings-copy

Conversation

@chhoumann

@chhoumann chhoumann commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Closes #1552. Closes #1553.

The problem, restated

Both issues are the same defect seen from two angles: QuickAdd's settings surface does not speak the language it has taught the user.

Fixing today's strings is the easy half. Neither issue stays fixed unless something in the build has an opinion, because both got here by accretion - #1552 is #1539 one function over, each patched with its own local ternary, which is how the same bug shipped twice.

What changed

#1552 - the folder delete confirmation. src/utils/choiceNoun.ts is now the single source of the folder-vs-choice vocabulary, and the rename prompt reads from it too. The dialog follows Obsidian's own delete dialog ("Delete folder" + "Are you sure you want to delete X?") and QuickAdd's other confirmations, which already use the question form. Descendants are counted by kind, so a nested folder is never called a choice.

Before
After

#1553 - sentence case, and a ratchet. The settings tab, plus everything that opens from it: the choice builder, the macro command modals, the AI assistant modals, the package manager. Stopping at the tab would have left a modal mixing "System prompt" with "Max Chunk Tokens", which reads as a bug - worse than uniform Title Case.

Before
After
Before
After

Two copy fixes fell out of the same read:

  • The "Search nested choices" description was the only place in the whole plugin UI that showed a user the internal type name "Multi". It now says folders.
  • "Disable AI & Online features" talked about "User Scripts" while this same PR lowercases that term everywhere else.

The Global variables panel rendered its own "Global Variables" title directly under the group heading of the same name. Removing the duplicate left "Add variable" floating in whitespace, so the panel now reads description -> list -> Add variable, matching the sibling "Template folder paths" row and the choices list. An empty list says so instead of showing a bare table header.

Before
After

Two bugs neither issue mentions

Every cancelled folder/choice delete raised an unhandled rejection. GenericYesNoPrompt rejects with the bare string "No answer given." on Esc or close rather than resolving false, and the Svelte call sites discard the promise. Reproduced live before the change:

$ obsidian eval '... click "Delete Journal", then close the dialog ...'
=> ["No answer given."]      // window "unhandledrejection" listener

and after: {"unhandled":[]}. isCancellationError is what separates dismissal from a genuine failure, which is still reported.

A malformed folder threw past that guard. dedupeChoicesById deliberately preserves a Multi whose children are missing or not an array rather than fabricating [], and such a folder renders fine in a filtered list (the filter rebuilds each folder as a clone with a real array) while delete resolves back to the raw node. flattenChoices then threw - a silent no-op plus the same unhandled rejection. Guarded, with tests for both shapes.

The ratchet

src/uiCopyCase.test.ts, following the src/importCycles.test.ts precedent for structural guards:

  1. Every heading and label from getSettingDefinitions() must be sentence case, against an explicit proper-noun list - including the Developer group, which __IS_DEV_BUILD__ hides from vitest, so its strings would otherwise be silently exempt.
  2. No definition string may contain Multi.
  3. A source scan over every UI-label literal in src/ (setName/setTitle/setButtonText/setTooltip, heading text, Svelte name= and <h2>): 194 literals matched, 0 offenders.

Mutation-checked, not assumed - reverting a single label anywhere in the converted surface fails with the file, the string and the offending word:

+   "gui/AIAssistantSettingsModal.ts: \"Edit Providers\" (Providers)"
+   "Development Information"

Labels built from a variable or template string can't be judged by a scan and are skipped rather than guessed at; the sampling sliders' .setName(spec.name) is the known case, and src/ai/samplingParams.ts PARAM_LABELS is kept byte-identical to it as its own comment requires.

Also fixed: a settings path that never existed

Model 'x' not found in configured providers. Add it in Settings -> QuickAdd -> AI -> Providers named a settings group QuickAdd has never had. Providers live behind the sparkles "Configure AI Assistant" button under the choice list, which is also where auto-sync lives, so the hint now names the route the docs document - and the test named after that hint now actually asserts it (it previously only checked a prefix that is byte-identical before and after). Same correction in QuickAddAPI.md.

Docs

Every {#id} anchor is byte-identical - Settings.md's eight group anchors and AIAssistant.md's #max-tokens, #max-chunk-tokens, #max-tokens-is-confusing. Verified, not assumed:

$ cd docs && pnpm build && python3 scripts/check-links.py
0 problems across 50 pages

Deliberately not changed

  • "Top P" and "Temperature" are the provider's parameter names; "Live Preview" is Obsidian's own.
  • `Untitled ${typeName} Choice` is a persisted choice name, not a label - lowercasing it would only split existing and new choices into two spellings.
  • settings["API Key"] object keys are a user-script API contract. Only the displayed label changed.
  • Docs page titles, sidebar labels, and prose that teaches "Multi choice" as the type name. The UI/docs split (UI says folder, docs teach Multi as the type) is worth its own pass.
  • Published GitHub release bodies quoting the old casing - UpdateModal fetches those at runtime; they are immutable history.

No back-compat surface moves. Nothing persisted, no settings keys, no command ids, no quickadd:run argument names, no migrations. Delete behaviour is unchanged apart from the copy and cancel returning false instead of throwing.

Follow-ups (pre-existing, filed separately)

Validation

  • pnpm test 347 files / 4000 tests green; pnpm run lint; pnpm run check 0 errors; pnpm run build; docs build + link check.
  • Live in a worktree-isolated Obsidian 1.13 vault: headings and labels read from the rendered DOM, the folder delete dialog with a mixed subtree (3 choices + 1 folder), the cancel path producing no unhandled rejection, the Global variables panel empty and populated with "Add variable" still working, the AI Assistant settings modal, the choice builder's "File opening location"/"View mode", and the context menu now reading "Enable in command palette" next to the row's "Command palette: Journal" tooltip.

Two unsolicited AI-generated drive-by PRs (#1556, #1557) targeted these issues; this is an independent maintainer pass and shares no code with them.

Summary by CodeRabbit

  • UI Improvements
    • Standardized sentence-case capitalization across settings, dialogs, buttons, labels, and tooltips.
    • Refined the Global Variables view layout, including an empty state and relocating the “Add variable” action.
    • Improved folder vs. choice wording in related confirmation and UI copy.
  • Bug Fixes
    • Deletion confirmation/error handling now treats cancellations as clean no-ops and reports failures more accurately.
    • Missing model help now points to the correct AI Assistant “Edit providers” area.
  • Documentation
    • Updated AI Assistant and related docs to match current UI label casing and navigation paths.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change standardizes QuickAdd UI and documentation copy to sentence case, adds regression coverage for casing, improves folder-aware deletion confirmations and error handling, and adjusts the global variables view empty state and action placement.

Changes

UI copy and documentation normalization

Layer / File(s) Summary
Settings, documentation, and UI labels
docs/src/content/docs/..., src/quickAddSettingsTab.ts, src/gui/..., src/styles.css
User-facing headings, labels, tooltips, notices, and documentation paths are normalized to sentence case with updated tests.
Sentence-case regression coverage
src/uiCopyCase.test.ts, src/quickAddSettingsTab.test.ts
Tests scan UI labels and settings definitions for title-case text and internal Multi terminology.

Folder deletion behavior

Layer / File(s) Summary
Folder vocabulary and deletion confirmations
src/utils/choiceNoun.ts, src/gui/choiceRename.ts, src/services/choiceService.ts, src/services/*test.ts
Deletion prompts count folders and choices separately, use shared nouns, handle cancellation, report other failures, and produce target-specific notices.
Global variables layout
src/gui/GlobalVariables/GlobalVariablesView.svelte
The view shows an empty-state row, removes its duplicate header, and renders the add-variable action below the table.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ChoiceService
  participant YesNoPrompt
  participant ErrorReporter
  User->>ChoiceService: delete folder or choice
  ChoiceService->>YesNoPrompt: request noun-aware confirmation
  YesNoPrompt-->>ChoiceService: confirm, cancel, or fail
  ChoiceService->>ErrorReporter: report non-cancellation failure
Loading

Poem

A bunny hops through labels bright,
Making every heading read just right.
Folders speak as folders now,
Choices count with careful bow.
Empty tables softly say,
“No variables here today!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 68.75% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main UI copy change: folder terminology and sentence-case settings text.
Linked Issues check ✅ Passed The PR matches #1552 and #1553 by fixing folder delete wording and converting settings labels/headings to sentence case.
Out of Scope Changes check ✅ Passed No clear out-of-scope code changes stand out; the added tests, docs, and Global variables UI tweaks align with the stated objectives.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chhoumann/1552-settings-copy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

Latest commit: b1bff68
Status: ✅  Deploy successful!
Preview URL: https://d0ed4049.quickadd.pages.dev
Branch Preview URL: https://chhoumann-1552-settings-copy.quickadd.pages.dev

View logs

@chhoumann
chhoumann marked this pull request as ready for review July 26, 2026 22:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/gui/GlobalVariables/GlobalVariablesView.svelte (1)

109-161: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use tabs for the changed Svelte markup and styles.

The two-space indentation beginning at Line 109 conflicts with the repository’s .editorconfig rule for .svelte files. As per coding guidelines, “**/*.{ts,tsx,js,mjs,cjs,svelte,css,json}: Use tab indentation and LF line endings.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/gui/GlobalVariables/GlobalVariablesView.svelte` around lines 109 - 161,
Replace the two-space indentation in the changed Svelte markup and styles around
the GlobalVariablesView content with tab indentation, including nested
conditionals, rows, controls, comments, and CSS declarations, while preserving
the existing structure and formatting.

Source: Coding guidelines

src/gui/AIAssistantProvidersModal.ts (1)

98-104: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use tab indentation in the changed TypeScript blocks.

The modified Add provider and Add model blocks remain space-indented, contrary to the repository rule for src/**/*.{ts,tsx}. Reindent these blocks and their nested statements with tabs.

As per coding guidelines, TypeScript source files must use tab indentation.

Also applies to: 288-300

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/gui/AIAssistantProvidersModal.ts` around lines 98 - 104, Reindent the
modified Add provider block around the button callback and the corresponding Add
model block with tabs, including all nested statements, while preserving the
existing logic and spacing style elsewhere.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/src/content/docs/docs/Advanced/ObsidianUri.md`:
- Line 64: Update the settings path in the Obsidian URI documentation to use the
sentence-case label “AI & online,” preserving the existing “Settings →” and
“Allow URI x-callback-url” labels.

In `@src/gui/MacroGUIs/CommandSequenceEditor.ts`:
- Around line 490-494: Update the tooltip construction in the choice button
setup to lowercase only typeName, producing sentence-case text such as “Add
capture choice” while leaving the button text and persisted choice name
unchanged.

In `@src/services/choiceService.test.ts`:
- Around line 620-622: Remove the duplicated standalone expect expression in the
test assertion around result and Notice.instances, retaining only the expect
call that chains to toContainEqual and preserving the existing assertion
behavior.

In `@src/uiCopyCase.test.ts`:
- Around line 160-167: Extend the PATTERNS source-scan collection in
uiCopyCase.test.ts to match literal Svelte button labels inside <button>
elements, including labels with surrounding whitespace, so Title Case text is
validated. Add regression coverage using a representative button label such as
the Add variable case and verify the scan detects it.

---

Outside diff comments:
In `@src/gui/AIAssistantProvidersModal.ts`:
- Around line 98-104: Reindent the modified Add provider block around the button
callback and the corresponding Add model block with tabs, including all nested
statements, while preserving the existing logic and spacing style elsewhere.

In `@src/gui/GlobalVariables/GlobalVariablesView.svelte`:
- Around line 109-161: Replace the two-space indentation in the changed Svelte
markup and styles around the GlobalVariablesView content with tab indentation,
including nested conditionals, rows, controls, comments, and CSS declarations,
while preserving the existing structure and formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 77b4e6bb-d765-4b64-a916-9d7d601bd6ce

📥 Commits

Reviewing files that changed from the base of the PR and between 13e316b and 786baae.

📒 Files selected for processing (44)
  • docs/src/content/docs/docs/AIAssistant.md
  • docs/src/content/docs/docs/Advanced/ObsidianUri.md
  • docs/src/content/docs/docs/Choices/CaptureChoice.md
  • docs/src/content/docs/docs/Choices/TemplateChoice.md
  • docs/src/content/docs/docs/ComingFromTemplater.md
  • docs/src/content/docs/docs/ControllingPrompts.md
  • docs/src/content/docs/docs/Examples/Macro_AddLocationLongLatFromAddress.md
  • docs/src/content/docs/docs/FormatSyntax.md
  • docs/src/content/docs/docs/GlobalVariables.md
  • docs/src/content/docs/docs/QuickAddAPI.md
  • docs/src/content/docs/docs/Settings.md
  • src/ai/aiHelpers.resolveModel.test.ts
  • src/ai/aiHelpers.ts
  • src/ai/samplingParams.test.ts
  • src/ai/samplingParams.ts
  • src/engine/runTemplateFromFolder.ts
  • src/gui/AIAssistantProvidersModal.audit-ai-assistant.test.ts
  • src/gui/AIAssistantProvidersModal.ts
  • src/gui/AIAssistantSettingsModal.ts
  • src/gui/ChoiceBuilder/TemplateChoiceForm.test.ts
  • src/gui/ChoiceBuilder/components/FileOpeningSetting.svelte
  • src/gui/ChoiceBuilder/components/FileOpeningSetting.test.ts
  • src/gui/GlobalVariables/GlobalVariablesView.svelte
  • src/gui/MacroGUIs/AIAssistantCommandSettingsModal.audit-cleanup.test.ts
  • src/gui/MacroGUIs/AIAssistantCommandSettingsModal.ts
  • src/gui/MacroGUIs/AIAssistantInfiniteCommandSettingsModal.test.ts
  • src/gui/MacroGUIs/AIAssistantInfiniteCommandSettingsModal.ts
  • src/gui/MacroGUIs/CommandSequenceEditor.ts
  • src/gui/MacroGUIs/ConditionalCommandSettingsModal.ts
  • src/gui/MacroGUIs/OpenFileCommandSettingsModal.ts
  • src/gui/MacroGUIs/samplingParamSettings.ts
  • src/gui/PackageManager/ExportPackageModal.svelte
  • src/gui/PackageManager/ImportPackageModal.svelte
  • src/gui/ProviderPickerModal.ts
  • src/gui/choiceList/contextMenu.ts
  • src/gui/choiceRename.ts
  • src/quickAddSettingsTab.test.ts
  • src/quickAddSettingsTab.ts
  • src/services/choiceService.audit-commands-choicelist.test.ts
  • src/services/choiceService.test.ts
  • src/services/choiceService.ts
  • src/styles.css
  • src/uiCopyCase.test.ts
  • src/utils/choiceNoun.ts

Comment thread docs/src/content/docs/docs/Advanced/ObsidianUri.md
Comment thread src/gui/MacroGUIs/CommandSequenceEditor.ts
Comment thread src/services/choiceService.test.ts
Comment thread src/uiCopyCase.test.ts

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

Copy link
Copy Markdown

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: 786baae344

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/choiceNoun.ts
Folders are `Multi` choices internally, but every user-facing surface calls
them folders - "New folder", "Add folder to {name}", "Edit folder", and since
#1539 the rename prompt. The delete confirmation was the last place the
internal name leaked: deleting a folder asked you to confirm deleting a
"choice" that contains "choices", counting nested folders as choices too.

- New `src/utils/choiceNoun.ts` is the single source of that vocabulary.
  #1539 and #1552 are the same bug one function apart, each fixed with a local
  ternary, which is how it shipped twice; the rename prompt now reads from the
  same helper.
- The confirmation follows Obsidian's own delete dialog ("Delete folder" /
  "Are you sure you want to delete X?") and QuickAdd's other confirm dialogs,
  which already use the question form.
- Descendants are counted by kind, so a nested folder is never called a
  choice: "everything inside it: 3 choices and 1 folder."
- The secrets-failure notice in the same function had the same leak; it is
  reachable for a folder holding a secret-bearing macro.
- Dismissing the prompt (Esc / close) rejects rather than resolving false, and
  the Svelte call sites discard the promise, so every cancelled delete raised
  an unhandled rejection. Verified live before and after.

Closes #1552
…folders

Obsidian core is sentence case throughout - "Files and links", "Community
plugins", "Date & time". QuickAdd's settings tab had drifted into Title Case
one setting at a time, so it reads as a guest that never learned the house
style (#1553).

Capitalization only for the headings and labels; no stored key changes, and no
change to what the settings search matches beyond the case of the words
themselves. Proper nouns keep their capitals: QuickAdd, AI, OpenAI, the AI
Assistant, and QuickAdd's choice types (Template, Capture, Macro).

Two copy fixes fall out of the same pass:

- The "Search nested choices" description was the only place in the whole
  plugin UI that showed the user the internal type name "Multi". Everything
  else says folder, so it now says folder too.
- "Disable AI & Online features" told users about "User Scripts" while the
  same PR lowercases that term everywhere else.

Two tests act as the ratchet: every heading and label must be sentence case
(with an explicit proper-noun list), and no definition string may contain
"Multi". Both fail if the drift starts again.

The Global variables panel also rendered its own "Global Variables" title
directly under the group heading of the same name. Removing the duplicate left
"Add variable" floating in whitespace, so the panel now reads description ->
list -> Add variable, matching the sibling "Template folder paths" row and the
choices list, and an empty list says so instead of showing a bare table header.
Every one of these opens from Settings -> QuickAdd, so stopping the #1553 pass
at the tab itself would have left the surface half-converted - and a modal that
mixes "System prompt" with "Max Chunk Tokens" reads as a bug, which is worse
than uniform Title Case.

Two of these were invisible to a literal-string sweep and are the reason the
first inventory came up short: the sampling sliders take their labels from
SLIDER_SPECS via .setName(spec.name) and render between two labels this pass
already renamed, and src/ai/samplingParams.ts PARAM_LABELS must stay
byte-identical to them (its own comment says so).

Deliberately left alone:
- "Top P" and "Temperature" are the provider's parameter names, not our copy.
- "Live Preview" is Obsidian's own view-mode name.
- `Untitled ${typeName} Choice` is a persisted choice NAME, not a label;
  lowercasing it would only split existing and new choices into two spellings.
- `settings["API Key"]` keys read by user scripts - renaming those would break
  working scripts. Only the displayed label changed.
"Add it in Settings → QuickAdd → AI → Providers" named a settings group that
has never existed. Providers live behind the sparkles "Configure AI Assistant"
button under the choice list, which is also where auto-sync is configured, so
the hint now names the route the docs already document.

Separate from the casing pass: this corrects a wrong instruction rather than a
capital letter.
The docs quote the settings labels verbatim, so leaving them behind would have
shipped a manual that names strings the plugin no longer has.

Every {#id} anchor override is byte-identical - Settings.md's eight group
anchors and AIAssistant.md's three heading anchors (#max-tokens,
#max-chunk-tokens, #max-tokens-is-confusing) - so all inbound links keep
resolving. `python3 docs/scripts/check-links.py` after a full build:
"0 problems across 50 pages".

Deliberately not touched:
- Docs page titles and links to them ("User Scripts", "Global Variables",
  "Share QuickAdd Packages") - page titles follow docs style, and their slugs
  are frozen.
- Code samples using `settings["API Key"]` - those are user-script setting keys,
  not our labels; renaming them would break working scripts.
- Prose that teaches "Multi choice" as the type name. Only Settings.md's
  "Search nested choices" entry changed, mirroring the UI string that now says
  folders. The docs-wide Multi/folder split is worth its own pass.
Two strings the first pass missed, and four guards that were weaker than they
looked:

- The choice row's context menu still said "Command Palette" while the icon
  button on the same row, driving the same toggle, said "Command palette".
  Obsidian's own plugin is "Command palette", so the proper-noun exclusion
  argued for the change, not against it.
- docs AIAssistant.md still bolded **Frequency Penalty** / **Presence Penalty**
  after the code renamed them, leaving four consecutive bullets in two
  spellings. "Temperature" and "Top P" stay - those did not change in code.
- The delete path's reportError message still hardcoded "choice". It surfaces
  as a Notice through GuiLogger, so it is user-visible, and it is the one
  vocabulary #1552 exists to enforce.
- buildMultiWarning called flattenChoices on unguarded children. A malformed
  Multi is deliberately preserved on load (dedupeChoicesById), and it is
  reachable through a filtered list, so deleting one threw past the new cancel
  guard: a silent no-op plus the unhandled rejection this branch removes.
- The corrected model-not-found route was asserted nowhere; the existing test,
  named for that hint, only checked a prefix that is byte-identical before and
  after.
- The sentence-case ratchet covered getSettingDefinitions() only - 1 of the 12
  surfaces this branch converted - and could not even see the Developer group,
  which __IS_DEV_BUILD__ hides from vitest.

The ratchet now lives in src/uiCopyCase.test.ts alongside a source scan over
every UI-label literal in src/ (194 matched, 0 offenders), following the
src/importCycles.test.ts precedent for structural guards. Reverting any single
renamed label - in the tab, a builder, a macro modal, an AI modal or the
package manager - now fails with the file, the string and the offending word.
The source-wide claim was not source-wide: buttons written as plain markup
(GlobalVariablesView's "Add variable", the package-manager actions) never touch
a Setting or setButtonText, so nothing checked them. 203 literals matched now,
0 offenders; reverting "Add variable" to Title Case fails the scan.
@chhoumann
chhoumann force-pushed the chhoumann/1552-settings-copy branch from 16d5df6 to b1bff68 Compare July 26, 2026 22:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/gui/AIAssistantProvidersModal.ts (1)

98-104: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use tab indentation in the changed UI blocks.

Lines 98 and 288-300 use spaces while this TypeScript file is tab-indented. Reformat these blocks with tabs to satisfy the repository editor configuration.

As per coding guidelines, “**/*.{ts,tsx,js,mjs,cjs,svelte,css,json}: Use tab indentation and LF line endings.”

Also applies to: 288-331

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/gui/AIAssistantProvidersModal.ts` around lines 98 - 104, Reformat the
changed UI blocks surrounding the Add provider handler and the corresponding
block near the other affected lines to use tab indentation instead of spaces.
Preserve all existing statements and behavior, and ensure the affected
TypeScript sections follow the repository’s tab-indentation convention.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/gui/AIAssistantProvidersModal.ts`:
- Around line 98-104: Reformat the changed UI blocks surrounding the Add
provider handler and the corresponding block near the other affected lines to
use tab indentation instead of spaces. Preserve all existing statements and
behavior, and ensure the affected TypeScript sections follow the repository’s
tab-indentation convention.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7faceb70-a5a8-4a74-be87-9d8f04a1129a

📥 Commits

Reviewing files that changed from the base of the PR and between 16d5df6 and b1bff68.

📒 Files selected for processing (44)
  • docs/src/content/docs/docs/AIAssistant.md
  • docs/src/content/docs/docs/Advanced/ObsidianUri.md
  • docs/src/content/docs/docs/Choices/CaptureChoice.md
  • docs/src/content/docs/docs/Choices/TemplateChoice.md
  • docs/src/content/docs/docs/ComingFromTemplater.md
  • docs/src/content/docs/docs/ControllingPrompts.md
  • docs/src/content/docs/docs/Examples/Macro_AddLocationLongLatFromAddress.md
  • docs/src/content/docs/docs/FormatSyntax.md
  • docs/src/content/docs/docs/GlobalVariables.md
  • docs/src/content/docs/docs/QuickAddAPI.md
  • docs/src/content/docs/docs/Settings.md
  • src/ai/aiHelpers.resolveModel.test.ts
  • src/ai/aiHelpers.ts
  • src/ai/samplingParams.test.ts
  • src/ai/samplingParams.ts
  • src/engine/runTemplateFromFolder.ts
  • src/gui/AIAssistantProvidersModal.audit-ai-assistant.test.ts
  • src/gui/AIAssistantProvidersModal.ts
  • src/gui/AIAssistantSettingsModal.ts
  • src/gui/ChoiceBuilder/TemplateChoiceForm.test.ts
  • src/gui/ChoiceBuilder/components/FileOpeningSetting.svelte
  • src/gui/ChoiceBuilder/components/FileOpeningSetting.test.ts
  • src/gui/GlobalVariables/GlobalVariablesView.svelte
  • src/gui/MacroGUIs/AIAssistantCommandSettingsModal.audit-cleanup.test.ts
  • src/gui/MacroGUIs/AIAssistantCommandSettingsModal.ts
  • src/gui/MacroGUIs/AIAssistantInfiniteCommandSettingsModal.test.ts
  • src/gui/MacroGUIs/AIAssistantInfiniteCommandSettingsModal.ts
  • src/gui/MacroGUIs/CommandSequenceEditor.ts
  • src/gui/MacroGUIs/ConditionalCommandSettingsModal.ts
  • src/gui/MacroGUIs/OpenFileCommandSettingsModal.ts
  • src/gui/MacroGUIs/samplingParamSettings.ts
  • src/gui/PackageManager/ExportPackageModal.svelte
  • src/gui/PackageManager/ImportPackageModal.svelte
  • src/gui/ProviderPickerModal.ts
  • src/gui/choiceList/contextMenu.ts
  • src/gui/choiceRename.ts
  • src/quickAddSettingsTab.test.ts
  • src/quickAddSettingsTab.ts
  • src/services/choiceService.audit-commands-choicelist.test.ts
  • src/services/choiceService.test.ts
  • src/services/choiceService.ts
  • src/styles.css
  • src/uiCopyCase.test.ts
  • src/utils/choiceNoun.ts
🚧 Files skipped from review as they are similar to previous changes (32)
  • src/ai/samplingParams.ts
  • docs/src/content/docs/docs/ControllingPrompts.md
  • src/gui/ProviderPickerModal.ts
  • docs/src/content/docs/docs/ComingFromTemplater.md
  • docs/src/content/docs/docs/Advanced/ObsidianUri.md
  • src/gui/MacroGUIs/OpenFileCommandSettingsModal.ts
  • src/styles.css
  • src/ai/aiHelpers.resolveModel.test.ts
  • src/gui/choiceList/contextMenu.ts
  • src/gui/ChoiceBuilder/components/FileOpeningSetting.svelte
  • src/engine/runTemplateFromFolder.ts
  • docs/src/content/docs/docs/QuickAddAPI.md
  • src/gui/AIAssistantProvidersModal.audit-ai-assistant.test.ts
  • src/gui/MacroGUIs/samplingParamSettings.ts
  • src/gui/PackageManager/ImportPackageModal.svelte
  • src/gui/MacroGUIs/AIAssistantCommandSettingsModal.ts
  • src/gui/ChoiceBuilder/components/FileOpeningSetting.test.ts
  • src/gui/MacroGUIs/AIAssistantCommandSettingsModal.audit-cleanup.test.ts
  • src/gui/ChoiceBuilder/TemplateChoiceForm.test.ts
  • src/services/choiceService.audit-commands-choicelist.test.ts
  • src/quickAddSettingsTab.test.ts
  • docs/src/content/docs/docs/Choices/TemplateChoice.md
  • src/ai/aiHelpers.ts
  • src/gui/AIAssistantSettingsModal.ts
  • src/gui/MacroGUIs/ConditionalCommandSettingsModal.ts
  • src/utils/choiceNoun.ts
  • src/gui/MacroGUIs/AIAssistantInfiniteCommandSettingsModal.test.ts
  • src/uiCopyCase.test.ts
  • docs/src/content/docs/docs/AIAssistant.md
  • src/gui/GlobalVariables/GlobalVariablesView.svelte
  • src/gui/MacroGUIs/CommandSequenceEditor.ts
  • src/services/choiceService.ts

@chhoumann
chhoumann merged commit 8d98b76 into master Jul 27, 2026
12 checks passed
@chhoumann
chhoumann deleted the chhoumann/1552-settings-copy branch July 27, 2026 05:05
chhoumann added a commit that referenced this pull request Jul 27, 2026
* fix(prompts): treat a dismissed Yes/No dialog as an answer, not an error

GenericYesNoPrompt rejected with the bare string "No answer given." when the
user dismissed it (Esc, close button, click outside). Three call sites awaited
it from handlers that discard the promise, so a normal cancel surfaced as
"Uncaught (in promise) No answer given." in the console.

Make the modal never reject. Prompt() is the confirmation helper - only an
explicit Yes confirms, so a dismissal is simply "no" - and Ask() returns
boolean | null for the one caller that must tell a dismissal from an explicit
No: quickAddApi.yesNoPrompt, where dismissing still aborts the macro with
UserCancelError exactly as before.

Every confirmation call site is now correct by construction, so the hand-rolled
try/catch guards in choiceService (#1562) and packageExportService are gone.

Fixes #1567

* docs(choices): point the malformed-folder guard at the reason that still exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant