[1.1.0] Browse table improvements - #19
Merged
Merged
Conversation
- #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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete GUI overhaul: browse tab with detail panel, installed plugins tab, search improvements, CLI fixes, and Windows packaging fix.
Changes
Array#join, error-handled selection handlerThread.newfrom browse (libuiqueue_mainbroken from bg thread), sync operations, pre-warm marketplace cachelayout_helper.m+compile_helper.cr) for NSLayoutConstraint ratio-based sizingcli.cr, addeddetect_products,gui_actions,loggerdetect_products_spec,gui_actions_spec, renamedplugin_meta_spec0xC0000135).ameba.ymltweaks, ameba runner scriptVerification
crystal specpassesbin/ameba— 0 offenses