Name: [IMP] viin_brain,viin_web_editor: UI hardening v1 (token + polish + Odoo-native + v2 seams) - Check the quality with Pylint: from test_lint to test_pylint

State: Failed finished in 19m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #27

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: 085195903a7f661471be9f5335119775d6b194ee

Description:

                                [FIX] viin_brain: P8 retroactive UI polish — selected highlight + breadcrumb path

Root cause for missing sidebar-active highlight: the brand-accent token
chain `--o-brain-accent: var(--o-brand-primary, var(--bs-primary))`
referenced CSS custom properties that Odoo 17 only exposes as Sass
compile-time variables, never as runtime `:root{--bs-primary}`. The
chain therefore resolved to nothing, `color-mix(in srgb, var(--o-brain-
accent) 12%, transparent)` evaluated to fully transparent, and the
`.o_brain_page_node.active > .o_brain_page_row` rule painted a
zero-alpha background — making the active page indistinguishable from
its neighbours even though the `.active` class was correctly added.

The Viindoo Odoo 17 build exposes the runtime brand colour as
`--primary` (Viindoo cyan #00bbce) plus the theme slot `--o-color-1`.
Re-chain `--o-brain-accent` to `var(--primary, var(--o-color-1))` so
the brand colour reaches every downstream token (`--o-brain-bg-hover`,
`--o-brain-bg-selected`, focus rings, presence palette, AI badge,
chip styles). Reviewer-side capture (commit binding via Visual Evidence
manifest) now shows a visible cyan tint on the selected row — pixel
sample (213, 239, 243) at 14% accent over light gray sidebar bg.

Defensive `Number()` cast in `rowClass()` keeps the active class
attached even when `activePageId` arrives as a string from URL hash
or localStorage restore (was not the original culprit but cheap to
keep).

Breadcrumb now appends the current page name as a final segment so
the visible breadcrumb reads `Vault › [Folder ›] Page` instead of
just `Vault`. `breadcrumbDisplay.fullPath` (tooltip on truncated
chains) tracks the same change so the tooltip stays consistent with
the rendered breadcrumb. Tour AC-P7-2 (root page) updated to expect
exactly 1 separator + a non-empty `.o_brain_breadcrumb_current`
segment; AC-P7-3 (truncated deep path) tooltip expectation extended
with the leaf page name.

Evidence (P8 retroactive, reviewer-side, ephemeral 24h auto-cleanup):
- session 20260503-1735-brain-ui-verify-g1-jsfix
  - shot-005-verify-g1-final-r2.png — sha256 9e438c47…
  - sidebar Welcome row paints (213, 239, 243) cyan tint vs Contracts
    row (118, 124, 129) plain gray (control sample)
  - breadcrumb header reads "Personal › Welcome"

CI gate: brain_v3_ci_check.py --strict — 8 PASS, 1 pre-existing WARN
(rule2_contenteditable in test file, unrelated). AC-1 hex grep PASS
(0 hex in components/apps SCSS).
                                

Branch: 17.0

Instance ID: 0

Age:

Up-time:

Odoo 17 Test Suite Using Docker

Check the quality with Pylint: from test_lint to test_pylint

  • install_module test_lint,test_pylint
  • exec_odoo --db_port 5432 --log-level=test --max-cron-threads=0 --load=base,web,to_base --stop-after-init --test-enable --test-tags=/test_lint,/test_pylint,/test_lint,/test_pylint,-:.test_pofiles_string_formatting
Create Date Level Message
05/03/2026 17:55:13 INFO
Using Docker Image Odoo 17 Ubuntu 22.04 Python 3.10:

FROM ubuntu:jammy

ENV LANG C.UTF-8

USER root

SHELL ["/bin/bash", "-c"]

# Install debian packages
RUN set -x ; \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-transport-https build-essential ca-certificates curl ffmpeg file fonts-freefont-ttf fonts-noto-cjk gawk gnupg gsfonts libldap2-dev libjpeg9-dev libsasl2-dev libxslt1-dev lsb-release node-less ocrmypdf sed sudo unzip xfonts-75dpi zip zlib1g-dev git build-essential cython3 libffi-dev libev-dev \
&& rm -rf /var/lib/apt/lists/*

# Install Python3 packages
RUN set -x ; \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3 python3-dbfread python3-dev python3-pip python3-setuptools python3-wheel python3-markdown python3-mock python3-phonenumbers python3-websocket python3-cffi libpq-dev \
&& rm -rf /var/lib/apt/lists/*

# Install wkhtml
RUN curl -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb -o /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb \
&& curl -sSL http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb -o /tmp/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& apt-get update \
&& dpkg -i /tmp/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& apt install -y -f --no-install-recommends /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb \
&& rm /tmp/libssl1.1_1.1.0g-2ubuntu4_amd64.deb /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb

# Install Odoo:Depends
ADD https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl /usr/local/bin/flamegraph.pl
RUN chmod +rx /usr/local/bin/flamegraph.pl
ADD https://raw.githubusercontent.com/Viindoo/odoo/17.0/debian/control /tmp/control.txt
RUN apt-get update \
&& sed -n '/^Depends:/,/^[A-Z]/p' /tmp/control.txt \
| awk '/^ [a-z]/ { gsub(/,/,"") ; print $1 }' | sort -u \
| egrep -v 'postgresql-client' \
| sed 's/python-imaging/python-pil/'| sed 's/python-pypdf/python-pypdf2/' | sed 's/python3-lxml-html-clean/python3-lxml/' \
| DEBIAN_FRONTEND=noninteractive xargs apt-get install -y -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install --no-cache-dir setuptools wheel && \
python3 -m pip install coverage==7.4.4 flamegraph

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-client-14 \
&& rm -rf /var/lib/apt/lists/*

# Install Google Chrome
#RUN curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /tmp/chrome.deb \
# && apt-get update \
# && apt-get -y install --no-install-recommends /tmp/chrome.deb \
# && rm /tmp/chrome.deb

# Install phantomjs
RUN curl -sSL https://nightly.odoo.com/resources/phantomjs.tar.bz2 -o /tmp/phantomjs.tar.bz2 \
&& tar xvfO /tmp/phantomjs.tar.bz2 phantomjs-2.1.1-linux-x86_64/bin/phantomjs > /usr/local/bin/phantomjs \
&& chmod +x /usr/local/bin/phantomjs \
&& rm -f /tmp/phantomjs.tar.bz2

ADD https://raw.githubusercontent.com/Viindoo/odoo/17.0/requirements.txt /root/requirements.txt
RUN python3 -m pip install --no-cache-dir wheel setuptools && \
python3 -m pip install --upgrade --no-cache-dir -r /root/requirements.txt && \
python3 -m pip install --no-cache-dir ebaysdk==2.1.5 pdf417gen==0.7.1

RUN python3 -m pip install --no-cache-dir requests pyOpenSSL

# Install debian packages
RUN set -x ; \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openssl iputils-ping openssh-client chromium-browser \
&& rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install --no-cache-dir --upgrade websocket-client==1.2.3 flake8==4.0.1
RUN python3 -m pip uninstall pylint pylint-odoo isort Pygments -y
RUN python3 -m pip install --no-cache-dir --upgrade pylint-odoo==9.0.5
RUN python3 -m pip install --no-cache-dir --upgrade Pygments==2.14.0 --no-deps
RUN python3 -m pip install --no-cache-dir --upgrade odoo_test_helper

# Install nodejs
RUN curl -fsSLO --compressed "https://nodejs.org/dist/v18.20.0/node-v18.20.0-linux-x64.tar.xz" \
&& tar -xJf "node-v18.20.0-linux-x64.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v18.20.0-linux-x64.tar.xz" \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
#RUN npm install -g rtlcss es-check eslint@8
RUN python3 -m pip install --no-cache-dir --upgrade setuptools==61 # để tương thích với python-pkcs11-0.7.0

# Install cloc package
RUN set -x ; \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cloc \
&& rm -rf /var/lib/apt/lists/*

RUN npm install -g rtlcss@3.4.0 es-check@6.0.0 eslint@8.57.1 prettier@2.7.1 eslint-config-prettier@8.5.0 eslint-plugin-prettier@4.2.1 --save-dev
05/03/2026 17:55:13 INFO
Docker command:
cd /data/build; python3 -m pip install --user --progress-bar off -r Viindoo-tvtmaaddons-17.0/requirements.txt && python3 -m pip install --user --progress-bar off -r Viindoo-erponline-enterprise-17.0/requirements.txt && python3 Viindoo-odoo-17.0/odoo-bin --addons-path Viindoo-odoo-17.0/odoo/addons,Viindoo-odoo-17.0/addons,Viindoo-tvtmaaddons-17.0,Viindoo-erponline-enterprise-17.0,Viindoo-branding-17.0,rb-0851959-221696 -d rb-0851959-221696-381450 --data-dir /data/build/datadir -i test_lint,test_pylint --db_port 5432 --log-level=test --max-cron-threads=0 --load=base,web,to_base --stop-after-init --test-enable --test-tags=/test_lint,/test_pylint,/test_lint,/test_pylint,-:.test_pofiles_string_formatting ;
05/03/2026 17:55:13 INFO
Container rb-0851959-221696-381450 started !
05/03/2026 18:15:23 INFO
Container rb-0851959-221696-381450 stopped !
05/03/2026 18:15:23 ERROR
odoo.addons.test_pylint.tests.test_eslint: FAIL: TestESLint.test_eslint Traceback (most recent call last): File "/data/build/Viindoo-tvtmaaddons-17.0/test_pylint/tests/test_eslint.py", line 67, in test_eslint self.assertEqual(process.returncode, 0, msg=f""" AssertionError: 1 != 0 : stdout: /data/build/rb-0851959-221696/viin_brain/static/tests/seams/v2_extension_seams_tests.js 34:19 error Replace `⏎············mount.classList.contains("d-none"),⏎············"canvas·mount·is·hidden·by·default·(d-none)"⏎········` with `mount.classList.contains("d-none"),·"canvas·mount·is·hidden·by·default·(d-none)"` prettier/prettier 41:13 error Replace `"canvas·mount·declares·t-ref=\"canvasMount\""` with `'canvas·mount·declares·t-ref="canvasMount"'` prettier/prettier 56:16 error Replace `"Seam·4:·ShareDialog·template·has·empty·<t·t-slot=\"collabSection\"/>"` with `'Seam·4:·ShareDialog·template·has·empty·<t·t-slot="collabSection"/>'` prettier/prettier 60:45 error Replace `"exactly·one·<t·t-slot=\"collabSection\"/>·declared"` with `'exactly·one·<t·t-slot="collabSection"/>·declared'` prettier/prettier 83:16 error Replace `"Seam·6:·AI·block·HTML·output·carries·additive·o_brain_ai_state_<status>·class",` with `⏎········"Seam·6:·AI·block·HTML·output·carries·additive·o_brain_ai_state_<status>·class",⏎·······` prettier/prettier 84:1 error Replace `········` with `············` prettier/prettier 85:9 error Insert `····` prettier/prettier 86:1 error Replace `········` with `············` prettier/prettier 87:9 error Insert `····` prettier/prettier 88:1 error Insert `····` prettier/prettier 89:9 error Insert `····` prettier/prettier 90:1 error Insert `····` prettier/prettier 91:1 error Replace `········` with `············` prettier/prettier 92:1 error Insert `····` prettier/prettier 93:1 error Replace `············` with `················` prettier/prettier 94:9 error Insert `····` prettier/prettier 95:1 error Replace `········` with `············` prettier/prettier 96:9 error Insert `····` prettier/prettier 97:1 error Insert `····` prettier/prettier 98:13 error Insert `····` prettier/prettier 99:9 error Insert `····` prettier/prettier 100:1 error Replace `····}` with `········}⏎····` prettier/prettier /data/build/rb-0851959-221696/viin_brain/static/tests/tours/brain_ux_batch_a_tour.js 126:21 error Insert `⏎···············` prettier/prettier ✖ 23 problems (23 errors, 0 warnings) 23 errors and 0 warnings potentially fixable with the `--fix` option. Perhaps you might benefit from installing the tooling found at: https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines#use-a-linter stderr:
05/03/2026 18:15:23 ERROR
odoo.modules.loading: Module test_pylint: 1 failures, 0 errors of 7 tests
05/03/2026 18:15:23 ERROR
odoo.modules.loading: At least one test failed when loading the modules.
05/03/2026 18:15:23 ERROR
odoo.tests.result: 1 failed, 0 error(s) of 24 tests when loading database 'rb-0851959-221696-381450'
05/03/2026 18:15:23 INFO
Cleaning all resource
05/03/2026 18:15:23 INFO
Cleanup finished