Skip to content

feat(resume): improve create and cloud restore flows - #9

Merged
dogxii merged 3 commits into
devfrom
feature/import-json-on-create
Jun 10, 2026
Merged

feat(resume): improve create and cloud restore flows#9
dogxii merged 3 commits into
devfrom
feature/import-json-on-create

Conversation

@dogxii

@dogxii dogxii commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • add JSON import as an option in the create-resume flow
  • reuse single-resume JSON normalization for create/import paths
  • warn before restoring cloud data when the cloud backup is older than the local library

Review notes

  • checked for redundant code and consolidated imported appearance handling
  • fixed icon fallback so imports keep theme-default icon behavior when section icons are absent

Checks

  • bun run lint
  • bun run build

Copilot AI review requested due to automatic review settings June 10, 2026 03:20
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
i-resume Building Building Preview Jun 10, 2026 3:20am

@dogxii
dogxii merged commit 831fd81 into dev Jun 10, 2026
3 checks passed
@dogxii
dogxii deleted the feature/import-json-on-create branch June 10, 2026 03:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the resume creation and restore experience by adding a single-resume JSON import option in the create flow, consolidating import appearance normalization logic, and adding a safety prompt when restoring older cloud backups that may overwrite newer local data.

Changes:

  • Add optional JSON file selection to the “create resume” modal and route it through a new onCreateFromJson handler.
  • Reuse a centralized getImportedResumeAppearance helper for consistent appearance normalization across import paths.
  • Warn users during cloud restore when the cloud backup timestamp is older than the newest local resume update.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/components/ResumeManager.tsx Adds JSON selection + import-create flow to the create modal and wires a new onCreateFromJson callback.
src/App.tsx Implements JSON-to-resume creation, consolidates appearance import normalization, and adds a cloud-restore staleness confirmation prompt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +321 to +323
const submit = async (event?: FormEvent<HTMLFormElement>) => {
event?.preventDefault();
onCreate({
name: name.trim() || defaultName,
tags: normalizeResumeTags(tagText),
const tags = normalizeResumeTags(tagText);
Comment on lines +334 to +346
setSubmitting(true);
setJsonError(null);
const error = await onCreateFromJson({
file: jsonFile,
name: name.trim(),
tags,
});
setSubmitting(false);
if (error) {
setJsonError(error);
return;
}
onClose();
Comment thread src/App.tsx
tags: string[];
file: File;
}): Promise<string | null> => {
if (!input.file.name.endsWith(".json")) return "请选择 .json 文件";
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