Skip to content

Remove the dead activityJson field - #3030

Merged
dqnykamp merged 1 commit into
Doenet:mainfrom
cqnykamp:split/remove-dead-activity-json
Aug 19, 2026
Merged

dqnykamp merged 1 commit into
Doenet:mainfrom
cqnykamp:split/remove-dead-activity-json

Conversation

@cqnykamp

@cqnykamp cqnykamp commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

activityJson was declared on QuestionBank and ProblemSet, and four loaders read it. The API never populated it, so every one of those loaders always fell through to compileActivityFromContent instead.

It appears to have started life as a client-side local. A later PR added the "stored revision source" fallback shape and the type field alongside it, but the server half that would have filled it in was never written.

This removes the field and collapses the four fallbacks down to the call that was already doing the work.

Two things that look similar are kept deliberately:

  • the loader result key of the same name — that one is the real compiled source
  • RawViewer's by-cid branch, which parses a genuinely stored revision source; its isActivitySource guard is load-bearing

No runtime change, since the deleted branch was unreachable. tsc --noEmit passes on apps/api and apps/app.

🤖 Generated with Claude Code

(Takes code from #3026)

`activityJson` was declared on `QuestionBank` and `ProblemSet` and read by
four loaders, but the API never populated it — every one of those loaders
always took the `compileActivityFromContent` fallback.

Git history shows why: it began as a client-side local, and a later PR
added the "stored revision source" fallback shape and the type field
without ever implementing the server half.

Delete the field and collapse the four fallbacks. The loader result key of
the same name is kept — that is the real compiled source — as is
RawViewer's by-cid branch, which parses a genuinely stored revision source
and whose `isActivitySource` guard is load-bearing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dqnykamp
dqnykamp merged commit 3d74815 into Doenet:main Aug 19, 2026
31 of 32 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.

2 participants