Skip to content

TT-7334 feat: add Prompt tool functionality and components#318

Merged
gtryus merged 3 commits into
developfrom
TT-7334-prompt
May 21, 2026
Merged

TT-7334 feat: add Prompt tool functionality and components#318
gtryus merged 3 commits into
developfrom
TT-7334-prompt

Conversation

@gtryus
Copy link
Copy Markdown
Contributor

@gtryus gtryus commented May 21, 2026

  • Introduced PassageDetailPrompt component to handle prompt-related UI.
  • Added PassageDetailPromptAdmin and PassageDetailPromptMember for admin and member views respectively.
  • Integrated prompt playback handling in PassageDetailPlayer and PassageDetailMobileFooter.
  • Updated context to manage prompt playback completion state.
  • Enhanced step permissions to include prompt-related checks.
  • Implemented tests for prompt section resource functionality.
  • Updated localization to support prompt strings.
  • Refactored tool slug handling to accommodate the new Prompt tool.

- Introduced PassageDetailPrompt component to handle prompt-related UI.
- Added PassageDetailPromptAdmin and PassageDetailPromptMember for admin and member views respectively.
- Integrated prompt playback handling in PassageDetailPlayer and PassageDetailMobileFooter.
- Updated context to manage prompt playback completion state.
- Enhanced step permissions to include prompt-related checks.
- Implemented tests for prompt section resource functionality.
- Updated localization to support prompt strings.
- Refactored tool slug handling to accommodate the new Prompt tool.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Prompt workflow tool to the renderer so BOLD teams can record a section-level prompt (admin view) and require members to listen before advancing (member view), while keeping compatibility with legacy BOLD steps that were previously modeled as resource.

Changes:

  • Introduces Prompt UI components and a hook to locate the prompt’s section resource, plus localization wiring for prompt strings.
  • Extends playback/player plumbing and PassageDetail context to track “prompt playback complete”, and gates mobile step navigation accordingly.
  • Adds ToolSlug.Prompt, updates tool/step resolution (including legacy BOLD mapping), and includes tests for slug resolution + prompt section resource selection.

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/renderer/src/utils/useStepPermission.ts Exposes permissionsOn to allow UI decisions based on whether step assignments are enabled.
src/renderer/src/store/localization/reducers.tsx Adds prompt layout strings and includes it in localization fetch hydration.
src/renderer/src/store/localization/model.tsx Adds IPromptStrings and extends tool strings with prompt.
src/renderer/src/store/localization/exported-strings-name.json Updates exported strings bundle name to the newly generated file.
src/renderer/src/selector/selectors.tsx Adds promptSelector for prompt localization strings.
src/renderer/src/routes/PassageDetail.tsx Wires Prompt into mobile step rendering.
src/renderer/src/crud/useTools.ts Adds Prompt to available tool slugs list.
src/renderer/src/crud/useStepTool.ts Adds resolveToolSlug to map legacy BOLD Prompt steps from resourceprompt.
src/renderer/src/crud/useStepTool.test.ts Tests for resolveToolSlug legacy mapping behavior.
src/renderer/src/crud/useSecResCreate.ts Allows creating section resources tied to a provided orgWorkflowStep (needed for prompt).
src/renderer/src/crud/useOfflineSetup.ts Updates offline BOLD workflow seed to use the prompt tool slug.
src/renderer/src/crud/toolSlug.ts Adds ToolSlug.Prompt and allows empty vernacular audio for prompt.
src/renderer/src/context/PassageDetailContext.tsx Adds prompt playback completion state + setter to context.
src/renderer/src/components/PassageDetail/Prompt/usePromptSectionResource.ts Implements prompt section resource selection logic (step-linked with legacy fallback).
src/renderer/src/components/PassageDetail/Prompt/usePromptSectionResource.test.ts Tests prompt row selection logic and edge cases.
src/renderer/src/components/PassageDetail/Prompt/PassageDetailPromptMember.tsx Member UI: plays prompt audio and sets playback-complete when finished.
src/renderer/src/components/PassageDetail/Prompt/PassageDetailPromptAdmin.tsx Admin UI: records/uploads prompt and creates the corresponding section resource.
src/renderer/src/components/PassageDetail/Prompt/PassageDetailPrompt.tsx Chooses admin vs member prompt UI based on role/permissions.
src/renderer/src/components/PassageDetail/PassageDetailPlayer.tsx Adds onDuration callback passthrough for consumers (Prompt member playback tracking).
src/renderer/src/components/PassageDetail/PassageDetailGrids.tsx Wires Prompt into desktop PassageDetail grid rendering.
src/renderer/src/components/PassageDetail/mobile/PassageDetailMobileFooter.tsx Gates “Next” on Prompt step until prompt exists and playback is complete.
src/renderer/src/components/PassageDetail/mobile/PassageDetailMobileFooter.cy.tsx Adds Cypress coverage for Prompt-step “Next” gating behavior.
localization/TranscriberAdmin-en.xlf Adds prompt string units (prompt.noAudio, tool.prompt).
localization/TranscriberAdmin-en-1.2.xliff Adds prompt string units with sourcefile contexts.

Comment thread src/renderer/src/components/PassageDetail/mobile/PassageDetailMobileFooter.tsx Outdated
Comment thread src/renderer/src/components/PassageDetail/Prompt/PassageDetailPromptMember.tsx Outdated
@gtryus gtryus requested a review from sarahentzel May 21, 2026 03:04
…props

- Added orgRole and permissions parameters to mountFooter function for improved flexibility.
- Updated defaultParams to utilize the new permissions prop.
- Modified test cases to include orgRole and permissions settings for better coverage.
@gtryus gtryus merged commit 4980a7e into develop May 21, 2026
2 checks passed
@gtryus gtryus deleted the TT-7334-prompt branch May 21, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants