Skip to content

Give vault instructions editor the full settings width - #2779

Merged
zeroliu merged 2 commits into
v4-previewfrom
codex/vault-instructions-layout
Aug 8, 2026
Merged

Give vault instructions editor the full settings width#2779
zeroliu merged 2 commits into
v4-previewfrom
codex/vault-instructions-layout

Conversation

@zeroliu

@zeroliu zeroliu commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Relates to logancyang/obsidian-copilot-preview#238

Why

In Settings → Copilot → Basic → Custom instructions, the vault instruction editor sits only in the right-hand control column. Because the editor is tall, the title and description occupy the top-left while a large blank area remains beneath them, making the setting feel lopsided and reducing the useful editing width.

What

The setting now uses a compact header with the title and description on the left and Open AGENTS.md on the right. The instruction editor spans the full card width underneath.

Before: The textarea is constrained to the right-hand settings column, leaving unused space below the label.

After: The label and file action share the header, and the textarea uses the full row below it.

Non goal

This does not change AGENTS.md loading, debounced saving, the save-before-open behavior, project instruction editing, instruction migration, discovery, or backend prompt behavior.

Screenshot

Before

vault-instructions-before

After

vault-instructions-after

Risk

Low

Criterion Status Reason
No behavior change, or a cosmetic/copy/docs/config change visible where it renders, or deterministic tests cover the changed behavior This is a settings-layout change, and the component test covers the header/editor structure plus both callbacks
A defect would fail CI or be obvious on first use The structural test runs in CI, and an incorrect column layout is immediately visible in Custom instructions
A revert fully restores prior state, including persisted data The change does not migrate or rewrite stored instructions
No auth, permissions, secrets, or input-handling surface changes Existing change and open callbacks are passed through unchanged
No public API, plugin API, message, or on-disk contract changes The AGENTS.md contract and plugin interfaces are unchanged
No core-path concurrency, async-lifecycle, or state-machine changes Only the presentational boundary changes; Basic settings retains its existing save/open orchestration
No hot-path behavior lacks deterministic coverage This settings-only component is not a hot path, and its interactions are covered
No new dependency Dependency manifests are unchanged
Human-only behavior stays in one feature area and surfaces quickly The visual result is confined to one Basic settings card and appears as soon as it is opened

Review: skim src/settings/v2/components/VaultInstructionsSetting.tsxVaultInstructionsSetting — then run Verification steps 2–4.

Verification

  1. Deploy the PR branch to the configured test vault with npm run test:vault.
  2. Open Settings → Copilot → Basic and scroll to Custom instructions.
  3. Confirm the title and description sit on the left, Open AGENTS.md sits on the right, and the textarea spans the full card width underneath without horizontal overflow.
  4. Type in the editor, then select Open AGENTS.md and confirm the latest text is present in the opened note.

@zeroliu
zeroliu marked this pull request as ready for review August 8, 2026 04:43
@zeroliu
zeroliu merged commit ea0f58f into v4-preview Aug 8, 2026
2 checks passed
@zeroliu
zeroliu deleted the codex/vault-instructions-layout branch August 8, 2026 04:43
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