Skip to content

feat(assessment): Add video column support - #297

Merged
vprashrex merged 2 commits into
mainfrom
feat/video-assessment-columns
Oct 29, 2026
Merged

vprashrex merged 2 commits into
mainfrom
feat/video-assessment-columns

Conversation

@vprashrex

@vprashrex vprashrex commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

Closes #296

Summary

  • The backend now accepts video as an assessment input_schema column type.
  • Wizard can create and edit video columns similarly to image and pdf.
    • Field type: PromptFieldType and Attachment.type now include "video".
    • Type picker: @ mention type picker offers "Video (link)".
    • Icon: adds VideoIcon and FieldTypeIcon component; all icons now use FieldTypeIcon for video.
    • Config blob: a type cast in configBlob.ts is updated to retain video column types during loading.

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran npm run dev and npm run build in the repository root and test.
  • If you've fixed a bug or added code that is tested
Original PR description

Issue

Closes #296

Summary

The backend now accepts video as an assessment input_schema column type. This PR lets the wizard create and edit video columns the same way it handles image and pdf.

  • Field type: PromptFieldType and Attachment.type now include "video" (app/lib/types/assessment/prompt.ts, core.ts).
  • Type picker: the @ mention type picker offers "Video (link)" (usePromptMentions.ts, promptTokens.ts).
  • Icon: adds VideoIcon and a small FieldTypeIcon component. The mention dropdown, prompt preview and Review & save modal each had their own image/pdf icon ternary; all three now use FieldTypeIcon, so video gets its icon everywhere.
  • Config blob: a type cast in configBlob.ts is widened so video columns keep their type when an assessor is loaded. Saving already sent { type: "video", format: "url" }.

Checklist

  • Ran npm run dev and npm run build in the repository root and test.
  • If you've fixed a bug or added code that is tested

Notes

  • tsc --noEmit, ESLint and Prettier pass. Not tested in the browser yet.
  • Video is Google-only on the backend. Only google, google-aistudio and google-gcp process 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.
  • Separate from fix(assessment): Resolve dropdown positioning bugs #295 (mention dropdown positioning). Both PRs touch 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

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.
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1
  • ready-for-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot changed the title feat(assessment): Support video attachment columns feat(assessment): Add video column support Oct 25, 2026
@vprashrex vprashrex self-assigned this Oct 25, 2026
@vprashrex
vprashrex requested a review from Ayush8923 October 26, 2026 04:18

@Ayush8923 Ayush8923 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

added the few comments.

Comment thread app/lib/types/assessment/core.ts Outdated
export interface Attachment {
column: string;
type: "image" | "pdf" | "mixed";
type: "image" | "pdf" | "video" | "mixed";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

all places have the same type so we can directly use PromptFieldType here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Comment on lines +12 to +14
return type === "text" ? (
<span className="font-sans text-[11px] font-semibold">Aa</span>
) : (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we also move this type related condition into the FieldTypeIcon component? so that all type declarations are in one component.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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).
@vprashrex
vprashrex requested a review from Ayush8923 October 29, 2026 06:32
@vprashrex
vprashrex merged commit 88b2c40 into main Oct 29, 2026
2 checks passed
@vprashrex
vprashrex deleted the feat/video-assessment-columns branch October 29, 2026 16:19
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.6.0-main.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assessment PromptEditor: Add video field type

2 participants