Skip to content

refactor: move scribo into packages folder - #19

Merged
losolio merged 1 commit into
mainfrom
refactor/monorepo-folder-structure
Sep 15, 2026
Merged

losolio merged 1 commit into
mainfrom
refactor/monorepo-folder-structure

Conversation

@losolio

@losolio losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 15, 2026 20:09
@losolio
losolio force-pushed the refactor/monorepo-folder-structure branch from c9e38cd to 25cccd7 Compare September 15, 2026 20:12

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.

🔵 Needs a closer look

It introduces multiple correctness/security/accessibility issues (e.g., unsafe URL sanitization fallback, broken dropdown keyboard navigation, duplicate history listeners, and ref typing mismatch) that should be fixed before merging.

Pull request overview

This PR converts the repo into a pnpm workspace and relocates the Scribo codebase into packages/scribo, including Vite/TS configs and the editor implementation (Lexical-based) plus new Schedule/Callout plugin modules.

Changes:

  • Turn the repo into a multi-package pnpm workspace and move Scribo into packages/scribo.
  • Add/update Vite + TS configs for building the library and a demo site.
  • Introduce editor utilities/UI/components plus Schedule + Callout plugin/node implementations (with a Vitest test for the schedule transformer).
File summaries
File Description
pnpm-workspace.yaml Defines workspace packages globs
pnpm-lock.yaml Adds workspace importer for packages/scribo
package.json Root becomes private workspace scripts shim
packages/scribo/package.json Package manifest moved into workspace package
packages/scribo/vite.config.ts Library build config (multi-entry)
packages/scribo/vite.config.site.ts Demo-site build config
packages/scribo/tsconfig.node.json TS config for Vite config typing
packages/scribo/tsconfig.json TS config for package source
packages/scribo/index.html Demo app HTML entry
packages/scribo/public/vite.svg Demo asset
packages/scribo/src/vite-env.d.ts Vite + *.md?raw typing
packages/scribo/src/utils/url.ts URL sanitization/validation helpers
packages/scribo/src/utils/setFloatingElemPositionForLinkEditor.ts Floating link editor positioning helper
packages/scribo/src/utils/setFloatingElemPosition.ts Floating element positioning helper
packages/scribo/src/utils/getSelectedNode.ts Lexical selection helper
packages/scribo/src/utils/environment.ts Runtime environment detection flags
packages/scribo/src/ui/Placeholder.tsx Placeholder component
packages/scribo/src/ui/Placeholder.css Placeholder styles
packages/scribo/src/ui/DropDown.tsx Toolbar dropdown UI
packages/scribo/src/ui/ContentEditable.tsx Lexical contentEditable wrapper
packages/scribo/src/ui/ContentEditable.css ContentEditable styles
packages/scribo/src/types.ts Public plugin/button types
packages/scribo/src/themes/EditorTheme.ts Lexical theme mapping
packages/scribo/src/themes/EditorTheme.css Theme CSS
packages/scribo/src/plugins/ToolbarPlugin.tsx Editor toolbar plugin
packages/scribo/src/plugins/LinkPlugin.tsx Link plugin wrapper
packages/scribo/src/plugins/HistoryPlugin.tsx Custom history implementation (currently unused)
packages/scribo/src/plugins/FloatingLinkEditorPlugin.tsx Floating link editor plugin
packages/scribo/src/plugins/FloatingLinkEditorPlugin.css Floating link editor styles
packages/scribo/src/plugins/AutoLinkPlugin.tsx Auto-link plugin wrapper
packages/scribo/src/nodes/schedule/ScheduleTransformer.ts Schedule markdown transformer
packages/scribo/src/nodes/schedule/ScheduleTransformer.test.ts Transformer unit tests
packages/scribo/src/nodes/schedule/schedulePlugin.ts Schedule plugin definition
packages/scribo/src/nodes/schedule/ScheduleItemNode.ts Schedule Lexical node
packages/scribo/src/nodes/schedule/ScheduleItemComponent.tsx Schedule node React decorator
packages/scribo/src/nodes/schedule/ScheduleItem.css Schedule UI styles
packages/scribo/src/nodes/schedule/index.ts Schedule public exports
packages/scribo/src/nodes/EditorNodes.ts Default node registrations
packages/scribo/src/nodes/callout/index.ts Callout public exports
packages/scribo/src/nodes/callout/CalloutTransformer.ts Callout markdown transformer
packages/scribo/src/nodes/callout/calloutPlugin.ts Callout plugin definition
packages/scribo/src/nodes/callout/CalloutNode.ts Callout Lexical node
packages/scribo/src/nodes/callout/CalloutComponent.tsx Callout DOM-event bridge plugin
packages/scribo/src/nodes/callout/Callout.css Callout styles
packages/scribo/src/MarkdownInput.tsx Form-friendly input wrapper
packages/scribo/src/MarkdownEditor.tsx Main editor component + plugin plumbing
packages/scribo/src/MarkdownEditor.css Editor styling bundle
packages/scribo/src/main.tsx Library entry + exports
packages/scribo/src/index.tsx Demo app entry
packages/scribo/src/context/SharedHistoryContext.tsx Shared history context
packages/scribo/src/App.tsx Demo app component
packages/scribo/src/App.css Demo app styles
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file
  • Files reviewed: 4/52 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 15, 2026 20:15

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.

🔵 Needs a closer look

It introduces confirmed functional and accessibility regressions (keyboard dropdown navigation, hardcoded Apple detection, and non-keyboard-activatable “button” divs) that should be fixed before merging.

Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file
  • Files reviewed: 4/52 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@losolio
losolio force-pushed the refactor/monorepo-folder-structure branch from 25cccd7 to 46ead07 Compare September 15, 2026 20:26
Copilot AI review requested due to automatic review settings September 15, 2026 20:26

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.

🔵 Needs a closer look

There are correctness and maintainability issues in newly added code/config (duplicate history update listener registration, URL validation accepting an invalid placeholder, and TypeScript/config gaps) that should be addressed before merging.

Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file
  • Files reviewed: 5/53 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@losolio

losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Jeg foreslår å flytte de gjenværende Copilot-kommentarene ut i egne issues og holde denne PR-en til ren struktur-/konfigurasjonsjobb. Det dekker bedre det som faktisk er endret her, og gjør oppfølgingen mer sporbar.

@losolio

losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Forslag til issue-spor:

  1. Dropdown keyboard navigation / focus management
  2. Replace hardcoded Apple detection with platform-agnostic modifier handling
  3. Make icon-only control divs real keyboard-accessible buttons
  4. Fix URL sanitization fallback to reject invalid placeholders
  5. Deduplicate history listener registration in SharedHistoryContext

Disse er bedre som egne issues enn som del av flytte-PR-en.

@losolio

losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Hvis issue-opprettingsverktøyet ikke er tilgjengelig her, kan jeg i stedet formulere ferdige issue-tekster du kan lime inn manuelt. Men målet er fortsatt å holde monorepo-PR-en ren.

@losolio

losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Siste forsøk her: hvis issue-write ikke er tilgjengelig, stopper jeg på forslag og ikke mer repo-støy. Hovedpoenget er fortsatt å skille nye issues fra monorepo-flyttingen.

@losolio

losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Attempting actual issue creation through GitHub MCP now; if this still resolves to comment-only tools, then the session doesn’t expose the writer and I’ll need to give you issue drafts instead.

@losolio

losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

If this session still only exposes comment tools, I'll stop and hand over ready-made issue drafts instead of pretending to create them.

@losolio

losolio commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

I can only see comment tools in this session, not the issue writer. I'll switch to drafts if that doesn't resolve.

@losolio
losolio merged commit 96fe814 into main Sep 15, 2026
2 checks passed
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