Skip to content

[codex] Add bulleted list continuation - #89

Open
bendsp wants to merge 2 commits into
codex/editor-quality-passfrom
codex/feature-bullet-list-continuation
Open

[codex] Add bulleted list continuation#89
bendsp wants to merge 2 commits into
codex/editor-quality-passfrom
codex/feature-bullet-list-continuation

Conversation

@bendsp

@bendsp bendsp commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • continue unordered Markdown list markers when pressing Enter inside a bullet
  • exit an empty bullet item by removing the list marker
  • cover continuation, exit, and fallthrough behavior with unit tests

Validation

  • pnpm lint
  • pnpm typecheck
  • pnpm test:unit

Copilot AI review requested due to automatic review settings May 9, 2026 14:25

@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: 554c566182

ℹ️ 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 on lines +468 to +469
const match = line.text.match(/^(\s*)([-*+])\s+(.*)$/);
if (!match) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict Enter continuation to real list syntax

This handler treats any line matching ^\s*[-*+]\s+ as a list item without checking Markdown parse context, so pressing Enter inside fenced/indented code blocks (or other non-list contexts) that contain lines like - flag will incorrectly inject another bullet marker instead of a normal newline. That is a behavior regression introduced by this keybinding because it now rewrites non-list content based on plain text shape alone.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a CodeMirror command and keybinding intended to continue unordered Markdown list markers on Enter, including exiting an empty list item, with unit tests covering the new command behavior.

Changes:

  • Introduces continueUnorderedListCommand to continue (or exit) unordered list items on Enter.
  • Wires an Enter keybinding into the editor base keymap.
  • Adds unit tests for continuation, empty-item exit, and fallthrough behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/controllerShortcuts.test.ts Adds unit tests for unordered list continuation / exit behavior and updates the FakeView dispatch type to accept scrollIntoView.
src/renderer/editor/codemirror/extensions.ts Adds an Enter keybinding to run continueUnorderedListCommand.
src/renderer/editor/codemirror/commands.ts Implements continueUnorderedListCommand (continue marker or remove marker for empty items).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 40 to +47
export const buildBaseKeymap =
(): import("@codemirror/view").KeyBinding[] => [...searchKeymap];
(): import("@codemirror/view").KeyBinding[] => [
{
key: "Enter",
run: continueUnorderedListCommand,
},
...searchKeymap,
];
Comment on lines +468 to +472
const match = line.text.match(/^(\s*)([-*+])\s+(.*)$/);
if (!match) {
return false;
}

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.

2 participants