inplan 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -148,7 +148,8 @@ body {
148
148
 
149
149
  /* rail — a soft recessed paper surface so the comment cards read as light, floating
150
150
  cards rather than rows. */
151
- .ap-rail { overflow: auto; background: var(--paper); }
151
+ .ap-rail { background: var(--paper); } /* flex column (from .ap-pane); the inner scroller below scrolls, so PaneTabs stays pinned */
152
+ .ap-rail-scroll { flex: 1; min-height: 0; overflow: auto; }
152
153
  .ap-rail-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 1; font-size: 12px; }
153
154
  .ap-composer { padding: 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
154
155
  .ap-composer textarea { width: 100%; min-height: 48px; resize: vertical; }
@@ -52060,42 +52060,44 @@ function App() {
52060
52060
  /* @__PURE__ */ jsxRuntimeExports.jsx(VSplitter, { width: cmtW, setWidth: setCmtW }),
52061
52061
  /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "ap-pane ap-rail", ref: railRef, style: { width: cmtW }, children: [
52062
52062
  panes === 2 && /* @__PURE__ */ jsxRuntimeExports.jsx(PaneTabs, { tab: rightTab, onTab: setRightTab }),
52063
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ap-rail-head", children: [
52064
- /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: t2("rail.comments") }),
52065
- (resolvedCount > 0 || orphanedCount > 0) && /* @__PURE__ */ jsxRuntimeExports.jsx(
52066
- "button",
52067
- {
52068
- type: "button",
52069
- className: `ap-iconbtn ap-reveal${showResolvedOrphaned ? " on" : ""}`,
52070
- "aria-pressed": showResolvedOrphaned,
52071
- title: revealTip,
52072
- "aria-label": revealTip,
52073
- onClick: () => setShowResolvedOrphaned((v2) => !v2),
52074
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconRevealArchive, {})
52075
- }
52076
- )
52077
- ] }),
52078
- visible.map((o, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
52079
- (i === 0 || visible[i - 1].group !== o.group) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ap-section-title", children: o.group === 0 ? "Document" : "Anchored" }),
52080
- /* @__PURE__ */ jsxRuntimeExports.jsx(
52081
- ThreadCard,
52082
- {
52083
- thread: o.thread,
52084
- body: doc2.body,
52085
- orphaned: o.orphaned,
52086
- focused: focused === o.thread.root.id,
52087
- synced: syncedCommentId === o.thread.root.id,
52088
- disabled: editingLocked,
52089
- onFocus: () => focusComment(o.thread.root.id, false, true),
52090
- onReply: (text2) => apply(addReply(docRef.current, o.thread.root.id, text2, USER_AUTHOR).doc, { type: "comment_created", payload: { parentId: o.thread.root.id } }),
52091
- onAnswer: (selected, text2) => apply(addAnswer(docRef.current, o.thread.root.id, selected, text2, USER_AUTHOR).doc, { type: "comment_answered", payload: { parentId: o.thread.root.id, selected } }),
52092
- onResolve: (r2) => apply(setResolved(docRef.current, o.thread.root.id, r2), { type: "comment_resolved", payload: { id: o.thread.root.id, resolved: r2 } }),
52093
- onEdit: (id2, text2) => apply(editCommentText(docRef.current, id2, text2), { type: "comment_modified", payload: { id: id2 } }),
52094
- onDelete: (id2) => apply(deleteComment(docRef.current, id2), { type: "comment_deleted", payload: { id: id2 } })
52095
- }
52096
- )
52097
- ] }, o.thread.root.id)),
52098
- visible.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ap-empty", children: "No comments. Select text and use “+ Add Comment”." })
52063
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ap-rail-scroll", children: [
52064
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ap-rail-head", children: [
52065
+ /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: t2("rail.comments") }),
52066
+ (resolvedCount > 0 || orphanedCount > 0) && /* @__PURE__ */ jsxRuntimeExports.jsx(
52067
+ "button",
52068
+ {
52069
+ type: "button",
52070
+ className: `ap-iconbtn ap-reveal${showResolvedOrphaned ? " on" : ""}`,
52071
+ "aria-pressed": showResolvedOrphaned,
52072
+ title: revealTip,
52073
+ "aria-label": revealTip,
52074
+ onClick: () => setShowResolvedOrphaned((v2) => !v2),
52075
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconRevealArchive, {})
52076
+ }
52077
+ )
52078
+ ] }),
52079
+ visible.map((o, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
52080
+ (i === 0 || visible[i - 1].group !== o.group) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ap-section-title", children: o.group === 0 ? "Document" : "Anchored" }),
52081
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
52082
+ ThreadCard,
52083
+ {
52084
+ thread: o.thread,
52085
+ body: doc2.body,
52086
+ orphaned: o.orphaned,
52087
+ focused: focused === o.thread.root.id,
52088
+ synced: syncedCommentId === o.thread.root.id,
52089
+ disabled: editingLocked,
52090
+ onFocus: () => focusComment(o.thread.root.id, false, true),
52091
+ onReply: (text2) => apply(addReply(docRef.current, o.thread.root.id, text2, USER_AUTHOR).doc, { type: "comment_created", payload: { parentId: o.thread.root.id } }),
52092
+ onAnswer: (selected, text2) => apply(addAnswer(docRef.current, o.thread.root.id, selected, text2, USER_AUTHOR).doc, { type: "comment_answered", payload: { parentId: o.thread.root.id, selected } }),
52093
+ onResolve: (r2) => apply(setResolved(docRef.current, o.thread.root.id, r2), { type: "comment_resolved", payload: { id: o.thread.root.id, resolved: r2 } }),
52094
+ onEdit: (id2, text2) => apply(editCommentText(docRef.current, id2, text2), { type: "comment_modified", payload: { id: id2 } }),
52095
+ onDelete: (id2) => apply(deleteComment(docRef.current, id2), { type: "comment_deleted", payload: { id: id2 } })
52096
+ }
52097
+ )
52098
+ ] }, o.thread.root.id)),
52099
+ visible.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ap-empty", children: "No comments. Select text and use “+ Add Comment”." })
52100
+ ] })
52099
52101
  ] })
52100
52102
  ] })
52101
52103
  ] }),
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'" />
6
6
  <title>inplan</title>
7
- <script type="module" crossorigin src="./assets/index-CPcGk8Qm.js"></script>
8
- <link rel="stylesheet" crossorigin href="./assets/index-C6viz_CE.css">
7
+ <script type="module" crossorigin src="./assets/index-PB8Gbp1q.js"></script>
8
+ <link rel="stylesheet" crossorigin href="./assets/index-DFcIiH7R.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
package/bin/cli.js CHANGED
@@ -866,7 +866,7 @@ function waitForActions(opts) {
866
866
  }
867
867
 
868
868
  // src/cli.ts
869
- var VERSION = "0.1.3";
869
+ var VERSION = "0.1.5";
870
870
  function output(obj) {
871
871
  process.stdout.write(JSON.stringify(obj) + "\n");
872
872
  }
@@ -905,27 +905,48 @@ function announcePresence(docId, token, model) {
905
905
  }
906
906
  }
907
907
  function resolveBundledApp() {
908
+ const here = dirname6(fileURLToPath(import.meta.url));
909
+ const appMain = join5(here, "..", "app", "main", "index.js");
910
+ if (!existsSync7(appMain)) return { appMain: null };
908
911
  try {
909
- const here = dirname6(fileURLToPath(import.meta.url));
910
- const appMain = join5(here, "..", "app", "main", "index.js");
911
- if (!existsSync7(appMain)) return null;
912
912
  const electron = createRequire(import.meta.url)("electron");
913
- return typeof electron === "string" ? { electron, appMain } : null;
914
- } catch {
915
- return null;
913
+ if (typeof electron === "string" && electron) return { electron, appMain };
914
+ return { appMain, error: "the electron dependency did not resolve to a runtime path" };
915
+ } catch (e) {
916
+ return { appMain, error: e instanceof Error ? e.message : String(e) };
916
917
  }
917
918
  }
918
919
  function spawnApp(file) {
920
+ const env = { ...process.env, INPLAN_CLI: process.argv[1] ?? "" };
919
921
  const override = process.env.INPLAN_APP_CMD;
920
- const bundled = override ? null : resolveBundledApp();
921
- if (!override && !bundled) {
922
- process.stderr.write("[inplan] no editor available (set INPLAN_APP_CMD, or install the published `inplan` package); running headless\n");
923
- return null;
922
+ if (override) {
923
+ const child = spawn2(override, [file], { detached: true, stdio: "ignore", shell: true, env });
924
+ child.unref();
925
+ return child.pid ?? null;
926
+ }
927
+ const bundled = resolveBundledApp();
928
+ if ("electron" in bundled) {
929
+ const child = spawn2(bundled.electron, [bundled.appMain, file], { detached: true, stdio: "ignore", env });
930
+ child.unref();
931
+ return child.pid ?? null;
932
+ }
933
+ if (bundled.appMain === null) {
934
+ process.stderr.write("[inplan] no bundled editor (running from source?) \u2014 set INPLAN_APP_CMD to your editor; running headless\n");
935
+ } else {
936
+ const root = resolve2(dirname6(bundled.appMain), "..", "..");
937
+ process.stderr.write(
938
+ `[inplan] the bundled editor's Electron runtime is unavailable: ${bundled.error}
939
+ \u2192 re-download the binary: npm rebuild electron --prefix "${root}"
940
+ If a proxy/firewall blocks the download, set a mirror first, e.g.
941
+ ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ (macOS/Linux)
942
+ set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ (Windows cmd)
943
+ Or point INPLAN_APP_CMD at an Electron that launches the app, e.g.
944
+ INPLAN_APP_CMD="electron '${bundled.appMain}'"
945
+ Running headless for now.
946
+ `
947
+ );
924
948
  }
925
- const env = { ...process.env, INPLAN_CLI: process.argv[1] ?? "" };
926
- const child = override ? spawn2(override, [file], { detached: true, stdio: "ignore", shell: true, env }) : spawn2(bundled.electron, [bundled.appMain, file], { detached: true, stdio: "ignore", env });
927
- child.unref();
928
- return child.pid ?? null;
949
+ return null;
929
950
  }
930
951
  function cadenceFrom(entries) {
931
952
  for (let i = entries.length - 1; i >= 0; i--) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inplan",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "inplan — a Markdown editor for human ⇄ coding-agent planning. CLI + desktop editor.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "repository": {