mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
[b5ffd849] Reconcile docs/frontend/hooks.md suppression audit section (#758)
* [f1894f11] Fix docs/frontend/hooks.md suppression-audit section (#748) * [f1894f11] docs(frontend): scope hooks.md suppression audit to frontend-only, link backend reconciliation doc * [f1894f11] docs(frontend): replace guessed backend-doc link with pending placeholder --------- Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> * [01650be9] docs(frontend): fix 3 pr_gate findings on hooks.md suppression-audit section — link backend's landed reconciliation doc, reword grep claim to past tense, drop stale line pin (#761) Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> * [b7174c1a] docs(frontend): rename hooks.md heading back to match backend's item-12 citation and correct suppression counts (#763) Round-2 pr_gate review of PR #758 found two issues in docs/frontend/hooks.md's suppression-audit section: the heading had drifted from "Mount-only effect audit" to "Frontend lint-suppression audit", breaking backend's item-12 citation in docs/backend/lint-suppression-reconciliation.md which cites this section by its original title; and the counts sentence wrongly implied backend's doc tracks a separate ~24-item remainder outside this frontend suppression, when backend's doc is actually the canonical 32-item ledger that already includes this one as item 12. Renamed the heading back verbatim (confirmed via repo-wide grep that no other file references the old heading or its anchor slug) and rewrote the sentence to describe backend's doc as the canonical reconciliation ledger and this section as the narrative writeup for item 12 within it. Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> --------- Co-authored-by: roboco-app[bot] <302741806+roboco-app[bot]@users.noreply.github.com> Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> Co-authored-by: Frontend PM <fe-pm@roboco.tech>
This commit is contained in:
co-authored by
Frontend Developer 1
roboco-app[bot] <302741806+roboco-app[bot]@users.noreply.github.com>
Frontend PM
parent
ce7941b92b
commit
687ae66a25
@@ -139,12 +139,16 @@ export function TaskDetail({ taskId }: { taskId: string | undefined }) {
|
||||
|
||||
No manual guard is needed before calling the hook — the `enabled: !!taskId` guard is built in and prevents wasted API calls and race conditions.
|
||||
|
||||
## Mount-only effect audit: eslint-disable in `journals-view.tsx`
|
||||
## Mount-only effect audit
|
||||
|
||||
**Scope: this section is a frontend-only accounting.** It covers lint suppressions (`eslint-disable`, `@ts-ignore`, `@ts-expect-error`) found in `panel/` alone — it is not the company-wide suppression ledger. Backend's [`docs/backend/lint-suppression-reconciliation.md`](../backend/lint-suppression-reconciliation.md) is the canonical 32-item reconciliation (2 waived + 9 framework-exempt + 2 fixed-at-source + 19 already-resolved) covering every suppression Sentinel's `no_lint_suppressions` hygiene scan originally flagged company-wide; this single frontend `eslint-disable` is already accounted for there as item 12, and this section is the detailed narrative writeup for that one item.
|
||||
|
||||
A direct grep of `panel/` for `eslint-disable`, `@ts-ignore`, and `@ts-expect-error` (excluding `node_modules`) historically found exactly **one** frontend suppression, documented below. It was fixed at the source in a later round (see disposition below); re-running the same grep against `panel/` today returns zero hits.
|
||||
|
||||
### `eslint-disable` formerly in `journals-view.tsx`, now removed — fixed at the source, no waiver needed
|
||||
|
||||
Sentinel's `no_lint_suppressions` hygiene scan flagged `// eslint-disable-next-line react-hooks/exhaustive-deps` guarding the mount-only localStorage-restore effect in `JournalsViewContent` (`panel/src/components/journals/journals-view.tsx`). That effect restores the `agent`/`type`/`task` filters saved from a prior visit into the URL, but only on a fresh `/agents?tab=journals` visit that carries no query params yet — it must run exactly once per mount, never again, or it would clobber a later intentional "clear filters" action with stale saved state.
|
||||
|
||||
### Audit result: fixed at the source, no waiver needed
|
||||
|
||||
The suppression was removed by replacing the empty `[]` dependency array with a `useRef` mount-guard:
|
||||
|
||||
```tsx
|
||||
|
||||
Reference in New Issue
Block a user