Skip to content

Conversation

@lindnjoe
Copy link
Owner

  • Changed condition from 'humidity !== null' to checking if 'humidity' key exists in object
  • More reliable detection using 'in' operator instead of value check
  • Will display humidity section even if value is temporarily null/undefined
  • Prevents reactivity issues with undefined properties

Description

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

[optional] Are there any post-deployment tasks we need to perform?

- Changed condition from 'humidity !== null' to checking if 'humidity' key exists in object
- More reliable detection using 'in' operator instead of value check
- Will display humidity section even if value is temporarily null/undefined
- Prevents reactivity issues with undefined properties
@lindnjoe lindnjoe merged commit 9d08e94 into develop Nov 10, 2025
4 of 6 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

get hasHumidity(): boolean {
// Check if this sensor has a humidity property
return 'humidity' in this.printerObject
}

P1 Badge Ensure humidity visibility reacts when property is added

The new hasHumidity getter only evaluates 'humidity' in this.printerObject without touching this.printerObject.humidity. Because the Vuex mutation updates humidity via Vue.set(state[key], subkey, value), the sensor object reference stays the same and this computed value is never invalidated after the initial render. If the printer object is created without a humidity key and the key is added later (which is the normal lifecycle for these sensors), hasHumidity will remain false and the humidity row will never appear, despite data arriving. The previous v-if="humidity !== null" depended on the humidity computed getter and updated correctly. Consider basing hasHumidity on this.printerObject.humidity (or this.humidity !== undefined) so the dependency is reactive.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

3 participants