From d89546bec735ecb5812785a76783cb281e1f54f0 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sat, 23 May 2026 22:11:51 -0400 Subject: [PATCH] fix(shopfloor): Back button + logo frame shape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two fixes from live testing of the 2026-05-24 redesign: 1. Job Workspace Back button routed to deprecated component. onBack() hardcoded tag: 'fp_shopfloor_landing' so tapping a card on the new plant kanban -> opening the workspace -> clicking Back dropped the user into the OLD per-step kanban (the legacy OWL component the data-record redirects don't reach because doAction bypasses the data layer). Fix: change the hardcoded tag to 'fp_plant_kanban'. Grep confirmed it's the only such reference in JS. 2. Logo frame shape — wider, shorter, logo bigger. 140x140 square -> 280x110 rectangle. Better fit for horizontal company logos (mark + name + tagline laid out left-to-right). Uniform 18px padding on all sides so the image breathes evenly. Image area is ~244x74 (vs old ~104x104), so a typical horizontal logo renders ~50% wider. border-radius 28->22 for the flatter rect; letter-mark placeholder font 52->44 to fit the shorter frame. Also augmented CLAUDE.md 'Legacy-action redirect' rule with a new 'grep JS for hardcoded doAction' clause — the XML-record redirect trick only covers ir.actions.client data; OWL components with inline this.action.doAction({tag: ...}) calls bypass the data layer entirely and need a separate sweep. Asset cache cleared (3 stale attachments). Co-Authored-By: Claude Opus 4.7 (1M context) --- fusion_plating/CLAUDE.md | 13 +++++++++++++ .../static/src/js/job_workspace.js | 17 +++++++++-------- .../static/src/scss/tablet_lock.scss | 13 +++++++++---- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/fusion_plating/CLAUDE.md b/fusion_plating/CLAUDE.md index bcdbf58e..792457bf 100644 --- a/fusion_plating/CLAUDE.md +++ b/fusion_plating/CLAUDE.md @@ -543,6 +543,19 @@ menu still saw the per-step kanban — `action_fp_shopfloor_tablet` and `action_fp_plant_overview` were both still hard-coded to `fp_shopfloor_landing` tag. +**Also grep JS for hardcoded `doAction({tag: ...})` calls** — XML +data records are only half the story. OWL components that wire up +"Back" buttons / navigation often hardcode the destination tag in +JS (e.g. `this.action.doAction({type: "ir.actions.client", tag: +"fp_shopfloor_landing", target: "current"})`). These bypass the +data layer entirely, so the redirect trick above doesn't cover +them. Caught 2026-05-24 — the Job Workspace `onBack()` still +pointed at `fp_shopfloor_landing`, so tapping a card in the new +plant kanban → opening the workspace → clicking Back dropped the +user into the deprecated per-step kanban. Fix: `grep -rn +'tag: ["\x27]' static/src/js/` before considering the +swap complete; rewrite every match to point at the new tag. + ## Deployment ### odoo-entech (LXC 111 on pve-worker5) diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js b/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js index faca887d..fc74a901 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js +++ b/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js @@ -88,16 +88,17 @@ export class FpJobWorkspace extends Component { // ---- Navigation -------------------------------------------------------- onBack() { - // The workspace is opened from the Landing kanban with - // target: "current", which REPLACES the current action and - // wipes the backstack. So `act_window_close` did nothing — - // there's no parent action to close to. Navigate explicitly - // to the Shop Floor Landing instead, which works whether the - // workspace was opened from the kanban, a QR scan, the manager - // dashboard, or a direct URL. (Bug caught 2026-05-23.) + // The workspace is opened with target: "current" which REPLACES + // the current action and wipes the backstack. Navigate explicitly + // to the plant-view kanban — the 2026-05-23 redesigned Shop Floor + // surface — instead of the deprecated fp_shopfloor_landing OWL + // component. (Bug caught 2026-05-24: Back used to dump the user + // into the old per-step kanban even when they entered via the + // new plant view.) See CLAUDE.md Critical Rule 21 + the + // "Legacy-action redirect" section. this.action.doAction({ type: "ir.actions.client", - tag: "fp_shopfloor_landing", + tag: "fp_plant_kanban", target: "current", }); } diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/scss/tablet_lock.scss b/fusion_plating/fusion_plating_shopfloor/static/src/scss/tablet_lock.scss index 9fed7bee..9b99cfcc 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/scss/tablet_lock.scss +++ b/fusion_plating/fusion_plating_shopfloor/static/src/scss/tablet_lock.scss @@ -30,8 +30,12 @@ .o_fp_lock_logo_frame { display: inline-flex; align-items: center; justify-content: center; - width: 140px; height: 140px; - border-radius: 28px; + // Rectangle (wider than tall) — fits horizontal company logos + // (mark + name + tagline laid out left-to-right) without leaving + // dead space top/bottom. Uniform 18px padding on all sides so the + // image breathes evenly. + width: 280px; height: 110px; + border-radius: 22px; margin-bottom: 16px; padding: 18px; box-sizing: border-box; @@ -48,10 +52,11 @@ } .o_fp_lock_logo_placeholder { - width: 100%; height: 100%; border-radius: 20px; + width: 100%; height: 100%; border-radius: 14px; background: linear-gradient(135deg, #f0a500, #ff6b00); display: inline-flex; align-items: center; justify-content: center; - font-size: 52px; font-weight: 900; color: #1a1d21; + font-size: 44px; font-weight: 900; color: #1a1d21; + letter-spacing: 0.04em; } .o_fp_lock_logo_text {