Skip to content

[1.1.0] Browse table improvements - #19

Merged
unurgunite merged 18 commits into
v1.1.0from
feature/browse-table-improvements
Jul 2, 2026
Merged

[1.1.0] Browse table improvements#19
unurgunite merged 18 commits into
v1.1.0from
feature/browse-table-improvements

Conversation

@unurgunite

@unurgunite unurgunite commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

Complete GUI overhaul: browse tab with detail panel, installed plugins tab, search improvements, CLI fixes, and Windows packaging fix.

Changes

  • Browse tab: detail/description panel (right side, HTML stripped → plain text), cache layer, input debounce, column sorting, installed indicator per plugin
  • Installed tab: table listing all locally installed JB plugins (Name, Plugin ID, Version, Since/Until Build)
  • Search: match only name and XML ID (not full description), debounced, cached at marketplace level
  • Detail panel: stretch both sides, built with Array#join, error-handled selection handler
  • Threading: removed Thread.new from browse (libui queue_main broken from bg thread), sync operations, pre-warm marketplace cache
  • Layout: ObjC bridge (layout_helper.m + compile_helper.cr) for NSLayoutConstraint ratio-based sizing
  • CLI: refactored cli.cr, added detect_products, gui_actions, logger
  • Specs: detect_products_spec, gui_actions_spec, renamed plugin_meta_spec
  • Windows: bundle Crystal runtime DLLs in release archives (fixes 0xC0000135)
  • Linting: .ameba.yml tweaks, ameba runner script

Verification

  • crystal spec passes
  • bin/ameba — 0 offenses

- #249: debounce search, cache DetectProducts, race condition guard
- #250: Add Installed column to browse table
- #251: Sort by column header click (name, downloads, rating)
…n from bg thread

Thread.new + UIng.queue_main не работают с UIng 0.1.1/libui:
- Crystal closures (->{} with captures) passed to C via LibUI.queue_main
  не гарантированно доживают до вызова с другого треда
- GC может собрать Proc до вызова callback из main loop
- row_deleted/row_inserted из queue_main тоже не работали

Фикс: вся работа по обновлению таблицы происходит синхронно
в main thread (в on_clicked callback). PluginMarketplace данные
кешируются (list_by_build), так что повторные вызовы быстрые.

Дополнительно:
- load_installed_for_browse вызывается один раз при старте
  (не из фонового треда, не трогает libui widgets из Thread.new)
- В лог пишутся первые 3 плагина после загрузки
- Row update: row_changed/row_inserted/row_deleted без дублирования
- Remove all Thread.new + UIng.queue_main from browse tab
  (closure GC issue with libui dispatch_async on bg threads)
- Pre-warm marketplace cache via UIng.timer at startup (1s delay)
- Log first 3 plugins on load
- load_installed_for_browse runs once at startup
- Add html_strip helper that removes HTML tags and decodes entities
- Use stripped text in search() instead of raw HTML description
- Add .gitignore for main_gui binary
- Split browse tab into left (table) + right (detail panel) via hbox
- Add MultilineEntry detail panel showing plugin info + stripped description
- Make html_strip public for reuse in main_gui.cr
- Update on_selection_changed to populate detail panel
- Clear detail when deselected
- Make detail box stretchy (true) so it gets visible width
- Replace heredoc with lines array + join for reliable text building
- Wrap selection handler body in begin/rescue
- Log any exceptions to the browse log
Also fix detail MultilineEntry wrapping=true
on_selection_changed already runs on main thread.
queue_main may cause silent failures if its closure is GCd.
@unurgunite unurgunite self-assigned this Jul 1, 2026
@unurgunite unurgunite added the enhancement New feature or request label Jul 1, 2026
@unurgunite
unurgunite merged commit 1ca85a0 into v1.1.0 Jul 2, 2026
10 checks passed
@unurgunite
unurgunite deleted the feature/browse-table-improvements branch July 2, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant