fix(shopfloor): Back button + logo frame shape

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) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-23 22:11:51 -04:00
parent 818dfa3882
commit d89546bec7
3 changed files with 31 additions and 12 deletions

View File

@@ -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]<old_tag>' 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)

View File

@@ -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",
});
}

View File

@@ -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 {