Skip to content

Improve Codeforces Problem Workspace editor UX#51

Merged
enlorik merged 3 commits into
mainfrom
copilot/improve-codeforces-editor
May 31, 2026
Merged

Improve Codeforces Problem Workspace editor UX#51
enlorik merged 3 commits into
mainfrom
copilot/improve-codeforces-editor

Conversation

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • upgraded the Codeforces Problem Workspace editor experience to feel Kotlin-native while staying focused on editing-only scope
  • kept the workspace structure intact: statement on the left, editor on the right, and samples/test-results panel below the editor
  • added quality-of-life UX around drafts and editor context without adding execution/submission/auth features

Changes

  • improved the existing textarea editor behavior and presentation:
    • Kotlin-focused header (Kotlin, .kt) and monospace coding experience
    • custom Tab handling to insert spaces instead of moving focus
    • stronger coding-surface styling for the editor panel
  • preserved draft persistence semantics and per-problem storage key:
    • draft key remains hdd-codeforces-draft-{contestId}-{index}
    • localStorage persistence still saves per-problem drafts
  • added default Kotlin starter code when no draft exists:
    • fun main() {
    • // solve here
    • }
  • updated editor actions area to keep placeholders visible while inactive:
    • Run Samples remains visible and disabled
    • Prepare Submit remains visible and disabled
  • added Reset Draft with explicit confirmation (active)
  • added post-edit local persistence feedback via Saved locally status
  • added problem id near the editor header for quick context
  • kept Codeforces original link visually small/secondary

Validation

  • npm test
  • npm run lint
  • npm run build

Notes

  • No code execution was added
  • No direct Codeforces submission was added
  • No login/auth was added
  • No Kotlin library injection was added
  • No unrelated page refactors were introduced

Copilot AI and others added 2 commits May 13, 2026 12:04

enlorik commented May 29, 2026

Copy link
Copy Markdown
Owner

Tiny follow-up on this PR before merge.

In ProblemWorkspace.jsx, keep the existing placeholder buttons visible:

  • Run Samples
  • Prepare Submit

They should remain disabled for now because this PR must not add execution or submission.

Keep the new Reset Draft button too.

Desired editor actions area:

  • Saved locally status when edited
  • Run Samples disabled
  • Prepare Submit disabled
  • Reset Draft active

Do not add code execution.
Do not add submission.
Do not refactor unrelated files.
Run npm test, npm run lint, npm run build.

enlorik commented May 30, 2026

Copy link
Copy Markdown
Owner

Copilot, please apply this small requested change directly to this PR.

In ProblemWorkspace.jsx, restore the existing placeholder buttons in the editor actions area:

  • Run Samples disabled
  • Prepare Submit disabled

Keep the new Reset Draft button active.
Keep the Saved locally status when edited.

Desired editor actions area:

  • Saved locally status when edited
  • Run Samples disabled
  • Prepare Submit disabled
  • Reset Draft active

Do not add code execution.
Do not add submission.
Do not refactor unrelated files.
Keep this PR scoped to the editor UX.

After changing it, run:

  • npm test
  • npm run lint
  • npm run build

enlorik commented May 31, 2026

Copy link
Copy Markdown
Owner

@copilot please apply this small requested change directly to this PR.

In ProblemWorkspace.jsx, restore the existing placeholder buttons in the editor actions area:

  • Run Samples disabled
  • Prepare Submit disabled

Keep the new Reset Draft button active.
Keep the Saved locally status when edited.

Desired editor actions area:

  • Saved locally status when edited
  • Run Samples disabled
  • Prepare Submit disabled
  • Reset Draft active

Do not add code execution.
Do not add submission.
Do not refactor unrelated files.
Keep this PR scoped to the editor UX.

After changing it, run:

  • npm test
  • npm run lint
  • npm run build

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please apply this small requested change directly to this PR.

In ProblemWorkspace.jsx, restore the existing placeholder buttons in the editor actions area:...

Implemented in commit 2b3507c.

I restored the disabled placeholder buttons in the editor actions area (Run Samples, Prepare Submit), kept Reset Draft active, and kept Saved locally shown after edits.

Validation passed:

  • npm test
  • npm run lint
  • npm run build

@enlorik
enlorik marked this pull request as ready for review May 31, 2026 10:16
@enlorik
enlorik merged commit cb55c72 into main May 31, 2026
1 check 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