Skip to content

feat(lasso): add "Make Space Above" + presentability pass - #56

Merged
gorlix merged 1 commit into
mainfrom
feat/make-space-above
Sep 1, 2026
Merged

feat(lasso): add "Make Space Above" + presentability pass#56
gorlix merged 1 commit into
mainfrom
feat/make-space-above

Conversation

@gorlix

@gorlix gorlix commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • New "above" cut direction via a second toolbar button (id 101), alongside the existing "below" (id 100, unchanged behavior). Verified on-device (Nomad): both directions select correctly, tested across multiple opens (Pending Button ID pattern + live listener correctly tracks direction across PluginHost's app-instance reuse).
  • computeLassoRect takes a required CutDirection — full mirror test coverage added (25 tests total, up from 18).
  • Direction-aware hint/intro copy (en + it).
  • Presentability pass ahead of an eventual InkHub listing: 3 new hand-drawn icons (replacing the unused template puzzle piece), PluginConfig.json name renamed from raw sn_make_space to "Make Space" (display-only, pluginKey/pluginID untouched), polished description, README badges + stale-copy fixes.
  • Plan: /home/gorlix/.claude/plans/functional-knitting-lantern.md

Test plan

  • npm run typecheck / lint / format / test:ci — all clean, 25/25 passing
  • Verified on-device (Nomad): sidebar shows two buttons with distinct icons, "Make Space" title shown correctly in Settings → Apps → Plugins, both cut directions work, re-opening via each button repeatedly tracks direction correctly

🤖 Generated with Claude Code

New "above" cut direction, chosen via a second toolbar button (id 101),
alongside the existing "below" (id 100, unchanged behavior). Both open the
same overlay; App.tsx tells them apart via the Pending Button ID pattern
(references/patterns.md Pattern 5) since PluginHost reuses the App
instance across opens rather than remounting it.

- src/makeSpace.ts: computeLassoRect takes a required CutDirection
  ('above' | 'below'); same clamped cut-line math either way, only which
  side of it becomes the rect changes. Mirror test coverage added.
- index.js: registers button 101, module-level pendingDirection +
  registerButtonListener for the pre-mount race, exports
  checkPendingDirection().
- App.tsx: direction state seeded from checkPendingDirection() on mount,
  kept live afterwards via its own registerButtonListener (stays
  subscribed for the reused instance's whole lifetime). Hint/intro copy
  now direction-aware.
- Locale files: tapToInsertSpaceBelow/Above, bodyBelow/Above.

Presentability pass, ahead of eventual InkHub listing (see
make-space.md §11 — no submission spec exists yet, this is the no-regret
prep bucket):
- Three new hand-drawn icons (assets/icon.png redesigned, +icon-below.png,
  +icon-above.png) replacing the generic unused-template puzzle piece.
- PluginConfig.json `name`: "sn_make_space" -> "Make Space" (this is the
  human-facing title shown in Settings -> Apps -> Plugins; independent of
  `pluginKey`/`pluginID`, which stay untouched — changing those would
  confuse the host's plugin registry for anyone with an existing install).
  `desc` polished into a proper listing-quality description.
- app.json `displayName` and package.json `description` filled in to
  match (app.json `name` left alone — it's the actual AppRegistry key,
  coupled to PluginConfig's `pluginKey`).
- README: badges, fixed stale "below"-only wording now that both
  directions exist.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gorlix
gorlix merged commit 1c7aa93 into main Sep 1, 2026
4 checks passed
@gorlix
gorlix deleted the feat/make-space-above branch September 1, 2026 15:44
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