Problem studio: write and validate problems in the browser
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, nextjs, nodejs, python
- Domain
- developer-experience, testing, tooling
Research direction
Start by reading backend/arena/scripts/validate-problems.js and the existing files under backend/arena/problems/ to understand validation and the problem/solution formats. Then trace how development-only pages and API routes are registered, and check their production behavior. Done means the studio meets the listed feature requirements, round-trips all 45 problems without diffs, includes one new problem, and passes npm test and node scripts/check-boundary.js.
Written by the indexing model from the issue text.
Description
Adding a problem means hand-writing JSON, two reference solutions and tests, then running npm run validate:problems and reading the output. It works, but it is the main friction for the contribution we want most.
Goal
A local problem studio, a page available only in development (/dev/problem-studio), for writing and validating a problem in one place.
Features
- A form for title, difficulty, tags and the function signature, with types picked from the supported list (see #3).
- A Markdown editor for the description with a live preview that matches how the problem renders in battles.
- Editors for the JavaScript and Python references side by side.
- A table of examples and tests. Adding a row type-checks the input against the signature.
- "Validate" runs the same checks as
backend/arena/scripts/validate-problems.jsand shows failures inline on the offending row. - "Generate expected outputs" fills expected values from the JavaScript reference, then confirms the Python reference agrees.
- "Save" writes
backend/arena/problems/<id>.jsonand the two solution files in exactly the format a hand-written problem uses.
Rules
- The page and its API routes refuse to load when
NODE_ENV=production, with a test proving it. - Validation must call the existing validator, not a copy of it, so the two can never drift.
Definition of done
- Write one real new problem with the studio and include it in the pull request.
- Round trip: loading an existing problem into the studio and saving it produces no diff, for all 45 problems.
npm testandnode scripts/check-boundary.jspass.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sennaicodes/codearena
-
Add issue and pull request templatesMay be free again @franciscorodr26 claimed this 22 days ago, and no pull request is open. Opendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
sennaicodes/codearena#13 · 1 comment ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 38/100
sennaicodes/codearena#31 ·
All issues in sennaicodes/codearena
Similar issues
-
Let TypeScript accept an initial object in ReactiveDictPossibly taken @yograj-vijay-yadav claimed this today. Openbug good first issue help wanted workshop
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
meteor/meteor#14919 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
akitaonrails/FrankMD#268 ·
Maintainers usually reply within 1 day
-
account: profile
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 5 days
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
mfreed7/xslt_polyfill#65 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day