Name:
[IMP] viin_brain,viin_web_editor: Brain core UI polish wave — runtime bug + a11y/responsive
State:
Failed
finished in 19m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#37
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
438948bd87cacc1e4217b0d5a70a14b76a941cb5
Description:
[FIX] viin_brain: sidebar lists linked notes + rich-text drawer + resize-reactive layout
Three review findings on the form-view Brain sidebar (sale.order):
1. A note created via the quick-create drawer links the record on the
Brain side but never appeared on the record's own sidebar/stat count.
Root cause: the sidebar query (_brain_mentioning_page_ids) and the
stat compute (_compute_brain_page_count) only looked at record_mention
links, while the drawer writes an explicit viin.brain.page.record.link
(linked_record_ids) — two distinct mechanisms. Union both so a note
'about this record' shows on the record. Page-level ACL preserved
(count filtered through an ACL-applied page search; list filtered by
the downstream page read). Behaviour tests added (fail pre-fix).
2. Drawer body was a plain textarea, so notes could not be formatted.
Replaced with a contenteditable rich-text region + a static toolbar
(bold / italic / heading / bulleted list) emitting semantic tags;
innerHTML is saved as content_html (mirrors PageEditor).
3. The form sidebar layout (panel/rail/strip) did not react to browser
resize. Root cause: uiService was read via bare useService('ui'), so
reads of ui.size did not subscribe the component. Wrapped with
useState (canonical Odoo 17 pattern) so layoutMode recomputes on
resize.
Branch:
17.0
Instance ID:
0
Age:
Up-time: