Commit Graph
667 Commits
Author SHA1 Message Date
Pakobbix e4bb48d9ea Update README.md 2026-07-12 15:09:11 +00:00
Pakobbix 8b5cf75396 Merge pull request 'Fixes #18: Update Readme & AGENTS.md' (#19) from issue-18-update-readme-agents into main
Reviewed-on: #19
2026-07-12 15:06:50 +00:00
ARIA c938916fd8 Fixes #18: Update README & AGENTS.md documentation
- README: Add Equipment System feature, Code Quality, Performance,
  Memory Management, Testing, Development Commands, and Tech Stack sections
- AGENTS.md: Update source tree with CSS modules, equipment constants,
  renderUtils, settings consolidation; add development commands,
  performance optimizations, memory management notes, validator factory;
  update file reference table

Based on PRs: #1 #3 #6 #8 #10 #12 #14 #17
2026-07-12 17:03:37 +02:00
Pakobbix f00475cb65 Merge pull request 'Fixes #16: Code quality enhancement Part 3' (#17) from issue-16-code-quality-enhancements into main
Reviewed-on: #17
2026-07-12 13:31:05 +00:00
ARIA 28802b1ad7 Fixes #16: Code quality enhancements Part 3
- Consolidate settings defaults: config.js is now single source of truth,
  state.js imports from config.js (eliminates ~300 lines of duplication)
- Validator factory: createStringValidator() unifies sanitizeLocationName/
  sanitizeItemName with configurable rules (blocked names, max length, rejects)
- Refactor promptBuilder: Extract getCharacterCardsInfo into buildNarratorCardInfo,
  buildGroupCardInfo, buildSingleCardInfo, appendCharacterFields
- Error handling: jsonRepair.js silent failures now log to console.debug
- Testing: Fix ESM support (babel.config.json + jest.config.cjs transform),
  add security.test.js with 24 tests for validator factory and security utilities
- Total: 78 tests passing (was 54)
2026-07-12 15:24:58 +02:00
Pakobbix 5b9c1ca0f1 Merge pull request 'Fixes #13: CSS performance optimizations (minification + extended custom properties)' (#14) from issue-13-css-performance into main
Reviewed-on: #14
2026-07-12 13:06:04 +00:00
ARIA df7d3b3a38 Fixes #13: CSS performance optimizations
- Add CSS minification support to build script (--minify flag)
  - Pure JS minifier: removes comments, whitespace, redundant chars
  - Reports size reduction percentage
  - Preserves CSS custom properties, data URIs, strings

- Refactor _08_themes.css: extend CSS custom properties pattern
  - Define theme-specific properties per theme (--rpg-content-bg,
    --rpg-content-box-shadow, --rpg-header-text-shadow, etc.)
  - Replace triple-theme selector duplication with single [data-theme]
    selectors — children inherit variables automatically
  - Reduces themes.css from 379 to ~220 lines
  - Reduces style.css from 305KB to 294KB (3.8% reduction)

- Add build:css:min npm script for production builds
- Add 9 tests for CSS build: minification, size reduction, CSS
  variable preservation, data URI preservation, theme refactoring
2026-07-12 14:55:36 +02:00
Pakobbix 29f7865927 Merge pull request 'Fixes #11: Memory management enhancements' (#12) from issue-11-memory-management into main
Reviewed-on: #12
2026-07-12 12:44:06 +00:00
ARIA 9c0f09619d Fixes #11: Memory management enhancements
- Add clearDomCache() for jQuery object cache invalidation on panel rebuild
- Track all event handlers in on()/once() for complete cleanup by unregisterAllEvents()
- Migrate direct eventSource.on() calls to tracked onEvent() in index.js, injector.js, sillyTavernExpressions.js
- Add clearDebugLogs() called on CHAT_CHANGED to prevent memory accumulation
- Add trackJQueryHandler()/cleanupJQueryEvents() infrastructure for jQuery event cleanup
- Add comprehensive memory management tests (14 new tests, all passing)
2026-07-12 14:31:14 +02:00
Pakobbix 3c4e632906 Merge pull request 'Enhancing code quality part 2.2: Parser Performance Optimizations' (#10) from issue-9-parser-performance into main
Reviewed-on: #10
2026-07-12 12:01:59 +00:00
ARIA 4e4b2328ba Fixes #9: Parser performance optimizations
- Pre-compile all regex patterns as module-level constants in parser.js and jsonRepair.js
- Add format detection caching (lastDetectedFormat, formatCacheHits) to skip redundant checks
- Add clearFormatCache() export for cache invalidation
- Add comprehensive test suite (33 tests) for parser and jsonRepair modules
- Fix regex escaping in dynamic patterns (statRegex, fieldRegex)
- Improve toFieldKey() regex specificity
2026-07-12 13:58:21 +02:00
Pakobbix c9d604ab68 Merge pull request 'Rendering performance optimizations (Issue #7 part 2.1)' (#8) from issue-7-rendering-performance into main
Reviewed-on: #8
2026-07-12 11:33:38 +00:00
ARIA f8894a9f3c Fix: Scope event handlers to container in userStats.js
Fixes critical bug identified by Zephyre_Review: event handlers used
global jQuery selectors instead of container-scoped selectors, causing
potential event handler leaks and scope mismatches.
2026-07-12 13:14:19 +02:00
ARIA 24c964c38d Fixes #7: Rendering performance optimizations
- requestAnimationFrame batching: rerenderRpgState() now batches all
  render calls into a single animation frame, reducing reflow/repaint costs

- Lightweight change detection: Render functions use updateIfChanged() to
  skip DOM updates when content hasn't changed, and only re-bind event
  handlers when the DOM was actually updated

- CSS content-visibility: Added content-visibility: auto with
  contain-intrinsic-size to inventory and equipment containers, deferring
  rendering of off-screen content

New file: src/systems/rendering/renderUtils.js (rendering utilities module)
Updated: All render modules + sillytavern.js integration + style.css
2026-07-12 13:10:17 +02:00
Pakobbix 1f8591d4ec Merge pull request 'Enhancing code quality part 1' (#6) from issue-5-code-quality-part1 into main
Reviewed-on: #6
2026-07-12 10:58:21 +00:00
ARIA 7e4461823f Fix: Pass required arguments to setupPlotButtons
- setupPlotButtons requires handlePlotClick and handleEncounterClick callbacks
- Pass sendPlotProgression and openEncounterModal as arguments
- removeAlternatePresentCharactersPanel is already correctly imported
2026-07-12 12:29:06 +02:00
ARIA c14c1417c1 Fixes #5: Refactor code quality - Part 1
- Split index.js from 1,567 lines to 456 lines (73% reduction)
  - Extracted settings event listeners to src/systems/ui/settingsListeners.js
  - Extracted settings panel to src/core/settingsPanel.js
  - Simplified initUI() and main initialization block

- Modularized style.css into 28 logical CSS modules in src/styles/
  - Added build script (npm run build:css) to concatenate modules
  - Modules: panel, components, user-stats, info-box, thoughts, settings,
    themes, modals, mobile, inventory, quests, equipment, encounters,
    weather, music-player, FAB widgets, strip widgets, etc.

- Updated package.json with build:css script and type: module

No functional changes - pure refactoring for maintainability.
2026-07-12 12:24:21 +02:00
Pakobbix b99c884144 Merge pull request 'Fix #2: Increase equipment stat limit from +20 to +99' (#3) from issue-2-equipment-stat-limit into main
Reviewed-on: #3
2026-07-04 18:42:15 +00:00
ARIA 8626d0476f Fixes #2: increase equipment stat limit from +20 to +99
- Update HTML input max attribute from 20 to 99 in generateStatCheckboxes()
- Update JS clamping logic Math.min(20, val) to Math.min(99, val) in saveEquipmentItem()
2026-07-04 20:39:20 +02:00
ARIA 54e1b0c2b2 Fix equipment vanishing after save: preserve equipment in loadChatData 2026-07-03 12:07:46 +02:00
ARIA 9720a7befe Fix Equipment modal and json filter 2026-07-03 11:53:35 +02:00
ARIA 130998105a Added Agents.md 2026-07-03 11:24:11 +02:00
Pakobbix 411dc3eb9c Merge pull request 'feat: add Equipment system with slot validation and stat bonuses' (#1) from feature/equipment-system into main
Reviewed-on: #1
2026-07-03 09:16:57 +00:00
ARIA 10cfe581ac feat: add Equipment tab with slot-type validation
Add a new Equipment tab to manage player gear and stat bonuses.

Features:
- 19 equipment slots across 8 categories (helmet, necklace, body armor, gloves, pants, shoes, rings, accessories)
- Type-to-slot validation: each type has max equipped limits (1 helmet, 10 rings, 3 accessories, etc.)
- Auto-slot assignment: equipping a ring fills the first available ring slot
- Stat bonuses from equipped items display on RPG attributes (e.g. STR 10 +2)
- Create/edit modal with stat checkboxes per RPG attribute
- Inventory list for unequipped items

Architecture:
- Shared constants in src/systems/equipment/constants.js
- Category-based types (Ring, Accessory) with auto-slot assignment
- v7 migration converts legacy slot-specific types to generic categories
- Full i18n support for all UI strings

Files:
- New: src/systems/equipment/constants.js
- New: src/systems/interaction/equipmentActions.js
- New: src/systems/rendering/equipment.js
- Modified: state.js, persistence.js, template.html, index.js
- Modified: userStats.js, desktop.js, mobile.js, layout.js, modals.js
- Modified: apiClient.js, sillytavern.js, style.css, en.json
2026-07-03 11:11:23 +02:00
Spicy_Marinara 38fb3d8c51 Fix tracker issues and add deprecation notice 2026-05-04 13:08:52 +02:00
Spicy Marinara 70792f8a2a Merge pull request #143 from SpicyMarinara/SpicyMarinara-patch-1
Update README to mark project as deprecated
2026-05-04 13:02:16 +02:00
Spicy Marinara 4cd0b72472 Update README to mark project as deprecated
Removed version details and updated project status to deprecated.
2026-05-04 12:57:37 +02:00
Spicy Marinara 2d63e51962 Merge pull request #142 from CristianAUnisa/fix-parser
Harden parser handling for noisy and non-critical tracker responses
2026-05-04 12:21:14 +02:00
Spicy Marinara f142d04b48 Merge pull request #141 from CristianAUnisa/fix-injection
Fix tracker injection commit ordering and swipe source selection
2026-05-04 12:20:53 +02:00
CristianAUnisa 45c074499c Fix tracker injection context ordering and placeholder timing 2026-04-25 19:39:07 +02:00
CristianAUnisa ad66410f81 Harden parser handling for noisy and non-critical tracker responses 2026-04-25 17:35:23 +02:00
Spicy Marinara ed9c12e969 Merge pull request #135 from Tremendoussly/doom-lite-expression-sync-v2
Add optional alternate tracker displays and expression sync
2026-04-14 18:26:56 +02:00
Tremendoussly 60c430919b Handle swipe-deleted expression refresh and add zh-cn display strings 2026-04-14 17:43:57 +02:00
Tremendoussly 2ee081a619 Clean up post-merge delete handler artifacts 2026-04-14 17:08:42 +02:00
Tremendoussly 19ebf1a834 Merge upstream/main into doom-lite-expression-sync-v2 2026-04-14 16:21:07 +02:00
Spicy Marinara bda43208a2 Merge pull request #140 from jakstein/ofilter-fix
replace filter tags with ofilter to avoid HTML/SVG collision
2026-04-08 20:41:00 +02:00
jakstein 781b28e02b replace filter tags with ofilter to avoid HTML/SVG collision 2026-04-08 12:30:43 +02:00
Spicy Marinara e018cddb15 Merge pull request #136 from dd178/main
Add Simplified Chinese Support and Improve Parser Robustness
2026-04-07 13:34:45 +02:00
Spicy Marinara 05655fecf7 Merge branch 'main' into main 2026-04-02 20:41:21 +02:00
Spicy Marinara 4e36667890 Merge pull request #130 from Alamion/main
A few small FRs
2026-04-02 20:39:09 +02:00
Spicy Marinara c82eb03288 Merge pull request #129 from DAurielS/fix/swipe-tracker-state
Fix: Save tracker state per-swipe, per-message
2026-04-02 20:38:55 +02:00
dd178 96d589adc0 ```
feat(encounter): 添加战斗遭遇界面国际化支持和优化错误处理

- 添加新的中文翻译项包括战斗结果状态、错误消息、界面标签等
- 将硬编码的文本替换为国际化翻译调用
- 添加战斗遭遇初始化和处理过程中的错误处理消息
- 增加确认对话框的本地化文本

fix(regex): 更新正则表达式以支持Unicode字符

- 将多个文件中的ASCII限定正则表达式 /[^a-z0-9]+/g 替换为Unicode感知的
  /[^\p{L}\p{N}]+/gu 以正确处理非ASCII字符
- 修复jsonMigration.js中的字符过滤逻辑

feat(weather): 为中文添加天气模式识别规则

- 在WEATHER_PATTERNS_BY_LANGUAGE中为zh-cn语言添加完整的天气关键词模式
- 支持中文天气条件的自动识别和效果应用

style(fab): 添加nowrap样式防止文本换行

- 在FAB组件中添加white-space: nowrap样式属性
```
2026-03-23 03:27:12 +08:00
dd178 55aa2a1e6a ```
feat(i18n): 添加简体中文语言选项并扩展国际化支持

添加了简体中文(zh-cn)语言选项到设置页面的语言选择下拉菜单中。

同时新增了大量国际化字符串。

fix(parser): 提高解析器的鲁棒性

现在会遍历所有json对象检测统一格式,即使AI响应中包含多个JSON对象也能正确识别统一格式。
```
2026-03-22 14:07:11 +08:00
Tremendoussly 215a122797 Fix clear cache to remove per-swipe tracker data 2026-03-15 23:11:50 +01:00
Tremendoussly 1a11699522 Rename expression sync to thought-based expression portraits and clean up compatibility solutions 2026-03-15 22:18:25 +01:00
Tremendoussly c79c941871 Replace speaker-based expression sync with thoughts-driven sync 2026-03-15 21:38:45 +01:00
Tremendoussly 9ef5b16663 Break expression sync cycle and guard portrait lookup 2026-03-15 17:38:39 +01:00
Tremendoussly 1d297aeecf Gate below-chat expression sync and localize inline thoughts 2026-03-15 16:51:20 +01:00
Tremendoussly 4d2afafbaf Harden synced expression portrait URLs 2026-03-15 15:54:46 +01:00
TremendousslyandCopilot Autofix powered by AI 08097e8b41 Translate new display settings for fr, ru, and zh-tw
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-15 15:02:42 +01:00