feat: persist account-level offline appearance (skin/cape) on OfflineAccount
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Read the existing OfflineAccount, AccountStore, OfflineProfile, and OfflineServer APIs to see how account JSON is loaded and saved. Start by deciding the open path-semantics and validation questions, then add OfflineAppearance with serde defaults so old account files still load. Done means saving and reloading an account preserves skin/cape/model, and offline_profile() reflects the stored appearance consistently.
Written by the indexing model from the issue text.
Description
Problem
OfflineServer already supports local skins and capes through OfflineProfile::with_skin, with_cape, and with_skin_model, but OfflineAccount persists only username and uuid. Any launcher that offers offline appearance settings has to maintain its own AccountId -> texture path registry outside the account store and rebuild OfflineProfile manually at launch time. That duplicates account-level state and makes the textures easy to get out of sync with the selected account.
Proposal
Persist optional account-level appearance on OfflineAccount:
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default)]
pub struct OfflineAppearance {
pub skin: Option<PathBuf>,
pub cape: Option<PathBuf>,
pub skin_model: SkinModel,
}
impl OfflineAccount {
pub fn appearance(&self) -> &OfflineAppearance;
pub fn set_appearance(&mut self, appearance: OfflineAppearance);
pub fn offline_profile(&self) -> OfflineProfile;
}
AccountStore::save already persists account state, so updating appearance would be set_appearance followed by save.
Questions to settle
- Should paths be stored as absolute paths or relative to the launcher's
storage_root? Relative paths are more portable, butOfflineAccountis created without storage-root context, sooffline_profile()would need the root. - Should texture existence and PNG validity be checked when setting appearance, when calling
offline_profile(), or left toOfflineServeras today? - Existing account JSON has no
appearancefield;#[serde(default)]should keep it backward compatible.
Scope
This should stay limited to account-level defaults. Per-instance overrides, file pickers, image previews, and size validation messaging belong to downstream launchers.
Why upstream
OfflineProfile, OfflineServer, OfflineAccount, and AccountStore all live in Elemental. Persisting these paths next to the account avoids every launcher reimplementing the same registry and keeps offline_profile() consistent with the account identity.
Particle currently constructs OfflineProfile::new(username) directly and has nowhere to persist the user's skin or cape choice.
- Dominant language
- Rust
- Stars
- 11
- Forks
- 1
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 52
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 ElectronicWave/Elemental
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ElectronicWave/Elemental#265 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ElectronicWave/Elemental#261 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ElectronicWave/Elemental#257 ·
Maintainers usually reply within 1 day
-
docs: CommentsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 34/100
ElectronicWave/Elemental#230 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
ElectronicWave/Elemental#227 · 1 comment ·
Maintainers usually reply within 1 day
All issues in ElectronicWave/Elemental
Similar issues
-
area:ui bug effort:low P2 source:agent
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
akitaonrails/ai-memory#2314 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nledford/Ladderback#809 ·
Maintainers usually reply within 1 day
-
bug low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dividebysandwich/rust-dos#1170 ·
Maintainers usually reply within 1 day
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day