ui-react: the recordings tray and the associate dialog import each other for two label helpers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- developer-experience, tooling
Research direction
Read packages/ui-react/src/components/voice/recordings-tray.tsx, associate-recordings.tsx, and the allowlist in scripts/check-import-cycles.ts. Move the two label helpers into recording-labels.ts, update both imports, and remove the recordings allowlist entry. Run the listed runtime tests and bun run lint; done when the helpers are unchanged, the cycle gate passes without that entry, and the API report remains byte-identical.
Written by the indexing model from the issue text.
Description
Context
Blocked by #4816
packages/ui-react/src/components/voice/recordings-tray.tsx:2 imports AssociateRecordings, and components/voice/associate-recordings.tsx:5 imports recordingClock and recordingDuration back from the tray. The two helpers are pure label functions of a Recording (recordings-tray.tsx:18-26) that happen to be declared in the tray; nothing about them belongs to either component. The pair is one of the runtime import cycles #4816 reports and allowlists.
Two other cycles outside ui-server and ui-sdk are deliberately not cut: components/chat/brain-markdown.tsx ↔ share-block.tsx (a share block renders Markdown, which can contain a share block) and module-diagrams/src/geometry.ts ↔ axis-layout.ts (a nested flowchart is laid out by the main builder). Both are mutual recursion by design, each partner is read only inside a function body, and cutting them would mean a render prop or an injected builder whose only purpose is to satisfy the gate. #4816 keeps them as permanent allowlist entries.
Scope
- Move
recordingClockandrecordingDurationto a leafcomponents/voice/recording-labels.ts; both components import it. - Remove the recordings entry from the allowlist in
scripts/check-import-cycles.ts.
Out of scope
- The share-block and diagrams cycles (kept by design, see Context).
- Any change to what the tray or the dialog renders, including label wording.
- The ui-server and ui-sdk cycles (#4818, #2530).
Acceptance criteria
-
git grep -n 'from "./recordings-tray.js"' -- packages/ui-react/src/components/voice/associate-recordings.tsxreturns nothing. -
bun run lintpasses with no recordings entry in the import-cycle allowlist. - Mutation recorded in the PR: re-add the import of
recordingClockfrom./recordings-tray.jsinassociate-recordings.tsx, watch the import-cycle gate fail naming both files, restore. - The two moved functions are byte-identical apart from their file (
git diff --color-moved). -
packages/ui-react/tests/association-signout-runtime.test.tsanddictation-selection-runtime.test.tspass with no edit, andpackages/ui-react/tests/browser/recordings-tray.offline.tsxpasses in the pinned browser. -
api-report/ui-react.txtis byte-identical.
Verification
bun run test packages/ui-react/tests/association-signout-runtime.test.ts packages/ui-react/tests/dictation-selection-runtime.test.ts
bun run test:browser
bun run lint
NODE_OPTIONS=--max-old-space-size=6144 bun run typecheck
bun run api-report
bun run check:pr --base origin/main
Contract impact
- This touches the integration contract, so it needs the
contractlabel, aCONTRACT:commit prefix, and the doc updated in the same commit. - This changes a published package's behaviour, so it needs a changeset.
Two internal helpers move between files inside @schlessera/brain-ui-react; no exported name or rendered output changes.
Found by a repository audit on 2026-11-26 (main 87b96b10c); independently reviewed before filing.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 0
- Avg merge
- 8h 3m
- Merged PRs (30d)
- 606
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from schlessera/brain-kit
-
agent-ready area: ui-server priority: p3 type: refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
schlessera/brain-kit#4833 ·
Maintainers usually reply within 1 day
-
ui-sdk: the turnId doc comment tells client authors echoing is optional, which a rev 3 host refusesOpenagent-ready area: ui-sdk priority: p3 type: docs
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
schlessera/brain-kit#4824 ·
Maintainers usually reply within 1 day
-
jobs: every command writes on open, so a read fails with "database is locked" during a long writeOpenagent-ready area: modules priority: p2 type: fix
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
schlessera/brain-kit#4809 ·
Maintainers usually reply within 1 day
-
agent-ready area: ui-server priority: p3 type: fix
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
schlessera/brain-kit#4807 ·
Maintainers usually reply within 1 day
-
agent-ready area: ui-server priority: p2 type: refactor
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
schlessera/brain-kit#4806 ·
Maintainers usually reply within 1 day
All issues in schlessera/brain-kit
Similar issues
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
backend enhancement priority:P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
geolens-io/geolens#4161 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
xdelmo/Portfolio-minimal#667 ·
Maintainers usually reply within 1 day
-
external-issue to-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
supabase/supabase#54162 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CyberTimon/RapidRAW#2303 ·
Maintainers usually reply within 1 day