Repository navigation
feat(assessment): Add video column support - #297
Conversation
Add "video" as an assessment field type alongside image and pdf. It is
offered in the @ mention type picker as "Video (link)", gets its own
icon in the dropdown, preview and review modal, and round-trips through
the config blob input_schema as {type: "video", format: "url"}.
Shared icon selection moves into FieldTypeIcon so the three call sites
stay in sync.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
Ayush8923
left a comment
There was a problem hiding this comment.
added the few comments.
| export interface Attachment { | ||
| column: string; | ||
| type: "image" | "pdf" | "mixed"; | ||
| type: "image" | "pdf" | "video" | "mixed"; |
There was a problem hiding this comment.
all places have the same type so we can directly use PromptFieldType here.
There was a problem hiding this comment.
Done in 1f9693f: Attachment.type is now PromptFieldType. The old "mixed" variant was never produced anywhere, so the !== "mixed" checks in promptTokens.ts and configBlob.ts now check !== "text", and the casts are gone.
| return type === "text" ? ( | ||
| <span className="font-sans text-[11px] font-semibold">Aa</span> | ||
| ) : ( |
There was a problem hiding this comment.
can we also move this type related condition into the FieldTypeIcon component? so that all type declarations are in one component.
There was a problem hiding this comment.
Done in 1f9693f: the text branch (the Aa badge) now lives in the component too, so every field-type branch is in one place. Review & save shows @ for text fields, so it passes textLabel="@" instead of keeping its own ternary.
There was a problem hiding this comment.
keep its name a bit like RenderFieldType etc. something like that, right now it sounds like an icon component here, and an icon component should be in the icons folder instead of here, but here it's rendering an icon based on the type, so please change the component name.
There was a problem hiding this comment.
Renamed to RenderFieldType in 1f9693f (app/components/assessment/editor/RenderFieldType.tsx). The plain VideoIcon stays in app/components/icons/common/.
- Type Attachment.type as PromptFieldType. The "mixed" variant was
never produced, so its guards now check for "text" instead.
- Rename FieldTypeIcon to RenderFieldType and move the text-type badge
into it, so every field-type branch lives in one component. Callers
pass textLabel where the text badge differs ("@" in Review & save).
|
🎉 This PR is included in version 0.6.0-main.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Issue
Closes #296
Summary
videoas an assessmentinput_schemacolumn type.PromptFieldTypeandAttachment.typenow include"video".@mention type picker offers "Video (link)".VideoIconandFieldTypeIconcomponent; all icons now useFieldTypeIconfor video.configBlob.tsis updated to retainvideocolumn types during loading.Checklist
Before submitting a pull request, please ensure that you mark these task.
npm run devandnpm run buildin the repository root and test.Original PR description
Issue
Closes #296
Summary
The backend now accepts
videoas an assessmentinput_schemacolumn type. This PR lets the wizard create and edit video columns the same way it handles image and pdf.PromptFieldTypeandAttachment.typenow include"video"(app/lib/types/assessment/prompt.ts,core.ts).@mention type picker offers "Video (link)" (usePromptMentions.ts,promptTokens.ts).VideoIconand a smallFieldTypeIconcomponent. The mention dropdown, prompt preview and Review & save modal each had their own image/pdf icon ternary; all three now useFieldTypeIcon, so video gets its icon everywhere.configBlob.tsis widened sovideocolumns keep their type when an assessor is loaded. Saving already sent{ type: "video", format: "url" }.Checklist
npm run devandnpm run buildin the repository root and test.Notes
tsc --noEmit, ESLint and Prettier pass. Not tested in the browser yet.google,google-aistudioandgoogle-gcpprocess video. With OpenAI or Anthropic, video cells are skipped silently and the assessment runs without the video. This PR does not stop that combination; per Assessment PromptEditor: Add video field type #296 it is left as a possible follow-up.MentionDropdown.tsx, in different parts of the file (imports/type badge here, positioning there), so they should merge without conflicts in either order.🤖 Generated with Claude Code