Skip to content

[codex] Add bulk page import - #6

Merged
mdroidian merged 1 commit into
mainfrom
codex/bulk-add-pages
Jun 30, 2026
Merged

[codex] Add bulk page import#6
mdroidian merged 1 commit into
mainfrom
codex/bulk-add-pages

Conversation

@mdroidian

@mdroidian mdroidian commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a bulk page import textarea to the Manage Pages dialog
  • accept one existing page title or Roam page URL per line
  • skip missing or duplicate pages and add valid pages without shortcuts

Validation

  • npx prettier --check src/components/QuickSwitcherSettings.tsx
  • npm test
  • npm run build:roam
  • subagent review: URL existence and title parsing edge cases found and fixed; final review found no issues

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Free

Run ID: 6f74ded3-8c86-4741-9547-3abaf0626b1d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

@mdroidian
mdroidian merged commit e772675 into main Jun 30, 2026
2 checks passed
@mdroidian
mdroidian deleted the codex/bulk-add-pages branch June 30, 2026 23:02

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

Open in Devin Review

entry.startsWith("#/") ||
entry.startsWith("/#/");

export const createQuickSwitcherSettingsComponent = ({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 Component state initialized from closure-captured initialBookmarks won't reflect external updates

The QuickSwitcherSettings component initializes bookmarks via useState(initialBookmarks) where initialBookmarks is captured by the createQuickSwitcherSettingsComponent closure (src/components/QuickSwitcherSettings.tsx:55). If bookmarks are modified externally (e.g. via keyboard shortcut registration in src/quickSwitcher.tsx:242-247), this component won't see those changes until re-mounted. This is a pre-existing pattern not introduced by this PR, but the bulk import feature makes it more likely that users open the settings dialog multiple times in one session, increasing the chance of stale state.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@charliecreates charliecreates 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.

Blocking feedback

  1. Bulk import can throw on malformed URL-encoded input and abort the whole add flow — src/components/QuickSwitcherSettings.tsx#L240

If you want Charlie to apply this fix, reply with item numbers (for example: please fix 1).


entries.forEach((entry) => {
const pageUid = isPageUrlInput({ entry })
? parsePageUidFromUrl({ url: entry })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

parsePageUidFromUrl can throw a URIError on malformed percent-encoded URLs (for example https://roamresearch.com/#/app/graph/page/%). Because this call is unguarded, one bad line aborts addBulkPages entirely instead of skipping that entry.

Suggested fix: make URL parsing fail-safe here (or in parsePageUidFromUrl) by catching decode/parsing errors and treating invalid lines as skipped entries.

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