Skip to content

ScriptKit v1.3.0 - #2301

Open
KenanMillet wants to merge 14 commits into
Roll20:masterfrom
KenanMillet:ScriptKit-v1.3.0
Open

ScriptKit v1.3.0#2301
KenanMillet wants to merge 14 commits into
Roll20:masterfrom
KenanMillet:ScriptKit-v1.3.0

Conversation

@KenanMillet

@KenanMillet KenanMillet commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

ScriptKit v1.3.0

Summary

Major quality-of-life release: smarter help system, on-demand tips, version date tracking, and fixes for Roll20 chat markdown interference.

Bug Fixes

  • Code block isolation: Content inside backtick code spans (`*`, `${expr}`) is no longer processed as markdown by Roll20's chat renderer. Asterisks and [link](url) syntax are entity-encoded to survive.
  • Null topic guard: Null topic entries (used to suppress auto-injected topics) no longer crash the man command.

New Features

Help System

  • help command: inline topics list replaced with compact "📖 Browse Topics" button
  • help auto-injected commands now include whatsnew, changes, motd, gen-help, gen-dev-docs (conditionally based on enabled aliases)
  • man topics display a 📖 handout anchor link to the corresponding section
  • Auto-conflict detection: Default aliases that match a registered command's first syntax word are auto-nulled at registration time — prevents ScriptKit from intercepting commands the script handles itself

Commands

  • !<plugin> changes [search] — full rendered changelog with optional text search filter
  • !scriptkit whatsnew [date] — consolidated whatsnew across all plugins with date-based filtering (ISO or human-readable dates)
  • Per-plugin whatsnew also accepts a date argument
  • !<plugin> motd / !scriptkit motd [plugin] — on-demand random tip with no-repeat tracking
  • !scriptkit dismiss-whatsnew — mark all current versions as seen

Startup Behavior

  • Debounced delivery: Single startup timer (10s after last registration) instead of per-plugin spam
  • What's New card: Automatically shown when plugins upgrade since last seen. Shows changes, "See Details" buttons, and a "✓ Dismiss" button to suppress until next upgrade.
  • MOTD: One random tip from the global pool after the What's New card

API

  • ScriptKit.getHelpHandout(scriptName) / ScriptKit.getDevHandout(scriptName) — cached handout object lookup (no repeated findObjs)
  • html.handoutLink(text, id, style, anchor) — optional 4th param for deep-linking to handout sections
  • html.table — wrapped in overflow-x:auto div for horizontal scrolling
  • ScriptKit.usage(msg, command?, reason?) — smart unknown-command handler:
    • Keyboard-weighted Levenshtein (QWERTY adjacency, 4-tier distance costs)
    • Prefix matching (input is prefix of command = always suggest)
    • Topic suggestions via substring (no fuzzy for topics)
    • Command-specific usage with reason display
    • Progressive fallback: suggestions → filtered results → "Show All Commands" button

Other

  • Version date tracking: changelog date fields stored in state for date-based queries
  • motdButtonStyle registration option for explicit button style override
  • Button styling auto-derived from frame borderLeft accent color
  • Updated registration log format (ȘꝀ ⚙⚙)

Tested

  • Code block fix: 7 test cases (lone asterisks, multiple code blocks, bold/italic around code, literal markdown in code)
  • getHelpHandout/getDevHandout: verified via Choreograph tutorials with anchored help links
  • html.handoutLink anchor: confirmed Roll20 navigates to correct heading
  • usage(): tested fuzzy matching (keyboard distance, prefix, threshold scaling)
  • Auto-conflict detection: verified aliases auto-null when matching registered commands
  • changes: tested with search filtering
  • whatsnew: tested date-based and version-based modes
  • motd: tested per-plugin, global pool, no-repeat cycling, button commands
  • What's New card: tested with simulated version upgrade, dismiss persists across restart

- Fix: code/pre blocks no longer have content processed as markdown
  (asterisks and [link](url) inside backticks are preserved via placeholder
  extraction + entity encoding for Roll20 chat compatibility)
- Fix: null topic entries no longer crash man command
- html.table: overflow-x:auto wrapper for horizontal scrolling
- Updated registration log format
- Updated README, TODO, version header, changelog
- ScriptKit.getHelpHandout(scriptName) — returns cached help handout object
- ScriptKit.getDevHandout(scriptName) — returns cached dev handout object
- Handouts cached at registration and generation time (no repeated findObjs)
- html.handoutLink(text, id, style, anchor) — optional 4th param appends /#anchor to URL
…atsnew

- help command: inline topics replaced with Browse Topics button
- help auto-injected commands: whatsnew, gen-help, gen-dev-docs (conditional)
- man topics show handout anchor link
- !scriptkit whatsnew [date]: consolidated view across all plugins
- Per-plugin whatsnew accepts date argument
- Version date tracking: changelog dates stored in state, auto-stamp current version
- Shared parseDate/getRelevantChangelog helpers
- Added 1.0.0 changelog entry with date
- !<plugin> changes [search]: full rendered changelog with optional text filter
- Auto-conflict detection: at registration, default aliases that match a registered
  command's first syntax word are auto-nulled (prevents interception)
- Updated changelog, README, TODO
- ScriptKit.usage(msg, scriptName): progressive fallback for unknown commands
  1. Keyboard-weighted fuzzy suggestions (QWERTY adjacency, 4-tier costs)
  2. Prefix matching (input is prefix of command = always suggest)
  3. Topic suggestions (prefix/substring only, no fuzzy)
  4. Fallback: Show All Commands button
- Updated changelog, README, TODO
…eter

- ScriptKit.usage(msg, scriptName, command?, reason?)
- With command: shows syntax + description + items from registered help data
- With reason: displays error message above the usage info
- Without command: unchanged fuzzy-match behavior
…nt fully

- usage(msg, command?, reason?) - no scriptName needed, auto-detected from msg prefix
- Updated dev-docs topic, README, TODO, changelog
- !<plugin> motd alias: show a random tip for that plugin
- !scriptkit motd [plugin]: global pool or plugin-specific
- In-memory no-repeat tracking (resets when all shown)
- Debounced startup: single tip 10s after last registration (replaces per-plugin)
- Derived button styling from frame borderLeft accent color
- motdButtonStyle opt for explicit override
- Shows changes since lastSeenVersion when plugins upgrade
- Dismissable via button (stores current versions, won't show again until next upgrade)
- First install: stores version silently (no card)
- Excludes ScriptKit itself from the card
- Guards See Details button on null whatsnew alias
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