Skip to content

fix(studies): allow editing external resources on a module - #15

Merged
veniplex merged 1 commit into
mainfrom
claude/edit-external-resources-in-modules
Jul 15, 2026
Merged

veniplex merged 1 commit into
mainfrom
claude/edit-external-resources-in-modules

Conversation

@veniplex

Copy link
Copy Markdown
Owner

Summary

  • ResourceDialog (src/components/studies/resource-dialog.tsx) already fully supported an edit mode — resource prop, isEdit flag, and calling updateResource on submit — but no caller anywhere ever rendered it in that mode. The module page (src/app/[locale]/(app)/studies/[programId]/[moduleId]/page.tsx) only wired up the "add" create trigger and a delete button per resource row, with no edit entry point at all, so external resources attached to a module could not be edited.
  • Added an edit icon trigger to ResourceDialog: when it's rendered uncontrolled with a resource prop, it now shows a small pencil icon button (instead of the "add" button) that opens the same dialog pre-filled for editing.
  • Wired this into the module page's resource list, next to the existing delete button, and de-duplicated the note decryption (was decrypted twice per row for display + the new edit payload; now computed once).

Test plan

  • npx tsc --noEmit
  • npx eslint on changed files
  • npx next build
  • Manually verify in the browser: open a module, add an external resource, click the new edit icon, change a field, save, and confirm the update persists

Generated by Claude Code

ResourceDialog already supported edit mode (resource prop, isEdit
flag, calls updateResource), but no caller ever rendered it that
way — the module page only added a create trigger and a delete
button per resource, with no edit entry point at all. Add an edit
icon trigger to ResourceDialog when a resource is passed
uncontrolled, and render it per row on the module page.
@veniplex veniplex added the release-candidate Creates a new release and deployment of docker image, once merged. label Jul 15, 2026
@veniplex
veniplex merged commit 07669df into main Jul 15, 2026
1 of 2 checks passed
@veniplex
veniplex deleted the claude/edit-external-resources-in-modules branch July 15, 2026 19:34
github-actions Bot added a commit that referenced this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-candidate Creates a new release and deployment of docker image, once merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants