Skip to content

V1.1.2 - #10

Merged
pallakartheekreddy merged 27 commits into
mainfrom
v1.1.2
Nov 11, 2026
Merged

pallakartheekreddy merged 27 commits into
mainfrom
v1.1.2

Conversation

@Deeksha1502

Copy link
Copy Markdown
Collaborator

Merges v1.1.2 into main.

chethann007 and others added 27 commits October 9, 2026 11:44
…/poll flow

The transcript APIs under content/v4/enrichment/object/* and the
?enrich=all read are replaced by the generic EnrichmentObject APIs, and
phase 1 has no approve/reject/edit. Remove the old flow ahead of the new
implementation.

- ContentEditorService: drop createTranscript, updateTranscript,
  approveTranscript, rejectTranscript, readTranscripts and their endpoints
- useEditor: drop the post-upload createTranscript call and the 20s
  transcript polling; hasTranscripts/transcripts/transcriptsChecked are
  inert until the enrichment-object read is added
- TranscriptsDrawer: read-only, reads ed.transcripts; remove approve,
  reject, segment editing and status re-confirmation
- i18n: remove 16 unused keys in all locales, reword NO_TRANSCRIPTS_SUB
- editor.scss: remove styles for the removed UI
- tests: remove suites for the removed behaviour, delete useEditor.test.ts
…ect APIs

Replace the removed transcript flow with the generic EnrichmentObject
model. Phase 1 is read-only: no approve, reject or edit.

- Registry (services/enrichment) holds one entry per enrichmentObjectType
  (mimeTypes, upload prompt, labels, player mapping). Transcript is the
  first entry; everything else is type-agnostic.
- Upload: the prompt shows one checkbox per applicable type. Only ticked
  types that also match the detected mimeType are saved, via a content
  update of enrichmentTypes using the versionKey from the fresh read. A
  failed save is non-fatal (toast + telemetry).
- Read: listEnrichmentObjects calls POST /object/enrichment/v4/list once
  when a published content opens (pkgVersion set); no polling. Header
  buttons, the drawer and the preview captions read from that list.
- UI: EnrichmentsDrawer shell with a read-only TranscriptPanel and shared
  status badge; preview captions use Live objects with a captionsUrl.
- Types: EnrichmentObject, EnrichmentStatus, TranscriptObject;
  ContentData.enrichmentTypes; DrawerKind 'enrichments'.
- i18n: ERROR_ENRICHMENT_SAVE in all locales; README capability row.
- Upload telemetry/event payloads carry enrichmentTypes instead of
  generateTranscripts.
- Introduced new endpoints and fields for Dynamic Course Assessment in ContentEditorService.
- Added logic to handle reading and refreshing content body specifically for Dynamic Assess.
- Implemented new utility functions for determining the deepest category code and handling skill pool counts.
- Enhanced taxonomy tests to cover new functionality.
- Updated mock services to simulate new Dynamic Assess behaviors.
- Expanded useEditor hook to manage Dynamic Assess state, including refresh polling and validation for skill and difficulty target.
- Added tests for Dynamic Assess content view gating, refresh body polling, and edge cases in generation.
…r and show the per-skill minimum [SBCOSS-1190]
- Cap each level of the draw at generated / multiplier, using the content's own multiplier, so the pool is never shown
- Detect generation by the generated body vs the pre-request one, guard overlapping polls, count hidden-tab ticks
- Block saves, review, publish and collaborator writes while generation runs; require a user id before generating
- Regenerate when only the framework changes (not for content saved without one)
- Framework picker: placeholder keeps Skill disabled, only the latest framework read applies,
  reset only multiselect values on switch, clear skills when their parent category changes
- Send [] when the last skill is removed; drop a generating save if the drawer closes during the pool check
- Parse a JSON-string generated target; difficultyTarget type accepts the API's string form
- Retry each pool count search once; memoise needsGeneration; Record<string, unknown> in the draw path
- Tests use literal expected ids and cover an undersized pool
feat: Enhance Dynamic Assess functionality and improve content handling
…190]

- The ECML preview renders the full generated body, so the creator and reviewer see every question; learners get their own draw in the portal
- Remove the now-unused per-user draw (ecmlBodyForUser, pickForLearner, seed helpers) and its tests
feat(dynamic-assess): preview the whole Dynamic Assess pool [SBCOSS-1…
…g note

- Keep the header button after a failed list load so the drawer's error and
  Retry are reachable; a failed reload no longer wipes loaded objects.
- Clear saved enrichmentTypes when the creator unticks the box, or replaces
  the file with a URL source or a file the type does not apply to.
- Derive enrichmentsChecked from the content key so the preview iframe is not
  mounted before the first list check settles.
- Include captionsUrl in the preview iframe key so a replaced VTT reloads.
- Check the response status and abort the segments fetch on unmount.
- Keep the segments view open while a reload runs; show the spinner only when
  nothing is loaded yet.
- Use allSettled when listing several types so one failure keeps the rest.
- Label a missing status "Draft" to match its tone.
- Remove the "translations will appear" note; the pipeline generates
  translations on its own. Drops the string in all six languages, its style
  and its tests.
Remove the hand-kept extensions list from the registry; the prompt now
checks the file extension's mimeType against the type's mimeTypes, the
same source the post-upload save uses.
Key the iframe on the transcripts passed to the player instead of every
Live object, so a Live object without a caption URL no longer restarts
playback.
parseSegments now returns an empty list for zero cues and null only for
an unrecognised shape, so a silent video no longer reads as a load error.
The list is fetched once when the content opens, so a Processing status
only changes on reload. Add a Refresh button that reuses
reloadEnrichments and is disabled while a reload is in flight.
Add an optional headerAction slot to Drawer and render Refresh as an
icon button beside Close, instead of a text row above the content.
feat(transcripts): read and request transcripts via the EnrichmentObject APIs
Copilot AI balanced review requested due to automatic review settings November 11, 2026 06:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Framework switches omit explicit clearing values from updates, leaving stale taxonomy metadata on the server under the newly selected framework.

4 open issues
What changed in this PR

Merges v1.1.2 into the generic content editor, adding Dynamic Course Assessment support and migrating transcripts to the EnrichmentObject APIs.

Changes:

  • Adds assessment configuration, pool validation, generation controls, and full-pool preview.
  • Replaces transcript editing and approval with upload-time requests, read-only viewing, and preview captions.
  • Expands tests and translations, documents enrichments, and updates the package to 2.0.8.
File Description
src/​types.ts Adds assessment fields and enrichment object types.
src/​test/​mockEd.ts Updates service and controller mocks.
src/​taxonomy.ts Adds deepest-category resolution.
src/​taxonomy.test.ts Tests deepest-category selection.
src/​services/​enrichment/​transcript.ts Maps Live transcripts to player captions.
src/​services/​enrichment/​registry.ts Registers enrichment types and applicability.
src/​services/​enrichment/​registry.test.ts Tests enrichment selection and caption mapping.
src/​services/​ContentEditorService.ts Adds enrichment listing and assessment APIs.
src/​services/​ContentEditorService.test.ts Tests the updated service contracts.
src/​poolPlan.ts Implements assessment pool feasibility checks.
src/​poolPlan.test.ts Tests allocation and question shortages.
src/​index.ts Exports enrichment types.
src/​icons.tsx Adds refresh and information icons.
src/​i18n/​translations.ta.ts Updates Tamil assessment and transcript strings.
src/​i18n/​translations.pt.ts Updates Portuguese assessment and transcript strings.
src/​i18n/​translations.hi.ts Updates Hindi assessment and transcript strings.
src/​i18n/​translations.fr.ts Updates French assessment and transcript strings.
src/​i18n/​translations.en.ts Updates English assessment and transcript strings.
src/​i18n/​translations.ar.ts Updates Arabic assessment and transcript strings.
src/​i18n/​i18n.test.ts Checks assessment translations and placeholders.
src/​editor.scss Styles assessment states and enrichment controls.
src/​dynamicAssessDraw.ts Adds generation settings and staleness checks.
src/​dynamicAssessDraw.test.ts Tests generation decisions and setting defaults.
src/​difficultyTarget.ts Parses and serializes difficulty targets.
src/​ContentEditor.tsx Integrates assessment states and enrichments drawer.
src/​ContentEditor.test.tsx Tests empty, generating, and stale assessment states.
src/​constants.ts Adds assessment defaults; removes video-only enrichment helpers.
src/​components/​UploadCanvas.tsx Uses registry-driven enrichment checkboxes.
src/​components/​UploadCanvas.test.tsx Tests upload enrichment choices.
src/​components/​TranscriptsDrawer.tsx Removes the legacy transcript editing drawer.
src/​components/​MetadataDrawer.tsx Adds framework, skill, difficulty, and pool validation controls.
src/​components/​Header.tsx Adds enrichment access and assessment action gating.
src/​components/​Header.test.tsx Tests enrichment buttons and assessment controls.
src/​components/​enrichment/​types.ts Defines shared enrichment panel props.
src/​components/​enrichment/​TranscriptSegmentsView.tsx Displays read-only transcript segments.
src/​components/​enrichment/​TranscriptPanel.tsx Lists transcript languages, statuses, and captions.
src/​components/​enrichment/​TranscriptPanel.test.tsx Tests transcript cards and segment loading.
src/​components/​enrichment/​statusUtils.ts Shares status labels and relative-time formatting.
src/​components/​enrichment/​enrichmentUi.ts Maps enrichment types to icons and panels.
src/​components/​enrichment/​EnrichmentStatusBadge.tsx Adds a reusable status badge.
src/​components/​enrichment/​EnrichmentsDrawer.tsx Adds the generic drawer with refresh and retry.
src/​components/​enrichment/​EnrichmentsDrawer.test.tsx Tests drawer rendering and actions.
src/​components/​EditorPreview.tsx Supplies assessment bodies and enrichment captions to preview.
src/​components/​EditorPreview.test.tsx Tests full-pool preview and caption updates.
src/​components/​Drawer.tsx Supports an optional header action.
README.md Documents the enrichment workflow and endpoint.
package.json Bumps the package version to 2.0.8.
package-lock.json Aligns the version and updates peer metadata.

Review effort: Balanced

Comment on lines +400 to +401
setMultiVals((s) => ({ ...s, ...Object.fromEntries(codes.filter((c) => c in s || c === skillPickerCode).map((c) => [c, []])) }));
setValues((s) => ({ ...s, ...Object.fromEntries(codes.filter((c) => c in s).map((c) => [c, ''])) }));
return `${t(lang, 'ERROR_POOL_INSUFFICIENT')}: ${lines.join('; ')}`;
}
// A skill that can't get its own minimum would be left out of the pool, and the settings would then never match the questions.
if (plan.shortSkills.length) return tf(lang, 'ERROR_SKILL_LEVELS_SHORT', { skills: plan.shortSkills.join(', ') });
</button>
<button type="button" className="ce-btn ce-btn--primary" onClick={onSave} disabled={busy}>
{saving
<button type="button" className="ce-btn ce-btn--primary" onClick={() => void onSave()} disabled={busy || checking || ed.dynamicAssessRefreshing}>
if (drawer !== 'enrichments') setActive(null);
}, [drawer, ed.content?.identifier]);

if (active) return <TranscriptSegmentsView lang={lang} transcript={active} onBack={() => setActive(null)} />;
@pallakartheekreddy
pallakartheekreddy merged commit 9987dc1 into main Nov 11, 2026
4 checks passed
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.

4 participants