Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions apps/self-hosted/config.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@
}
},
"features": {
"postsFilters": ["blog", "posts", "comments", "replies"],
"postsFilters": [
"blog",
"posts",
"comments",
"replies"
],
"likes": {
"enabled": true
},
Expand All @@ -60,9 +65,28 @@
},
"auth": {
"enabled": true,
"methods": ["keychain", "hivesigner", "hiveauth"]
"methods": [
"keychain",
"hivesigner",
"hiveauth"
]
},
"tipping": {
"general": {
"enabled": false,
"buttonLabel": "Tip"
},
"post": {
"enabled": false,
"buttonLabel": "Tip"
},
"amounts": [
1,
5,
10
]
}
}
}
}
}
}
6 changes: 5 additions & 1 deletion apps/self-hosted/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
"preview": "rsbuild preview"
},
"dependencies": {
"@ecency/hive-tx": "^7.3.4",
"@ecency/render-helper": "workspace:*",
"@ecency/sdk": "workspace:*",
"@ecency/ui": "workspace:*",
"@ecency/wallets": "workspace:*",
"@ecency/hive-tx": "^7.3.4",
"@floating-ui/dom": "^1.7.4",
"@floating-ui/react-dom": "^2.1.6",
"@tanstack/react-query": "^5.90.2",
"@tanstack/react-router": "^1.132.27",
"@tiptap/core": "^2.11.5",
Expand All @@ -38,6 +40,7 @@
"hivesigner": "^4.0.0",
"marked": "^12.0.0",
"motion": "^12.23.22",
"qrcode": "^1.5.4",
"qrcode.react": "^4.2.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
Expand All @@ -57,6 +60,7 @@
"@types/crypto-js": "^4.2.2",
"@types/dompurify": "^3.0.5",
"@types/node": "^24.6.0",
"@types/qrcode": "^1.5.5",
"@types/react": "^19.1.16",
"@types/react-dom": "^19.1.9",
"@types/speakingurl": "^13.0.6",
Expand Down
6 changes: 6 additions & 0 deletions apps/self-hosted/src/core/configuration-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export interface InstanceConfig {
post: {
text2Speech: { enabled: boolean };
};
tipping?: {
enabled?: boolean;
general?: { enabled: boolean; buttonLabel?: string };
post?: { enabled: boolean; buttonLabel?: string };
amounts?: number[];
};
Comment on lines +71 to +76
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Top-level tipping.enabled is a schema orphan.

The enabled?: boolean at the tipping root level is absent from both config.template.json and config-fields.ts. The per-variant general.enabled and post.enabled are the actual feature toggles, making the top-level field redundant and potentially confusing to anyone reading the type.

🔧 Suggested cleanup
 tipping?: {
-  enabled?: boolean;
   general?: { enabled: boolean; buttonLabel?: string };
   post?: { enabled: boolean; buttonLabel?: string };
   amounts?: number[];
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
tipping?: {
enabled?: boolean;
general?: { enabled: boolean; buttonLabel?: string };
post?: { enabled: boolean; buttonLabel?: string };
amounts?: number[];
};
tipping?: {
general?: { enabled: boolean; buttonLabel?: string };
post?: { enabled: boolean; buttonLabel?: string };
amounts?: number[];
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/self-hosted/src/core/configuration-loader.ts` around lines 71 - 76, The
top-level optional property tipping.enabled is an orphan and should be removed:
delete the enabled?: boolean from the tipping type in configuration-loader.ts so
the shape only contains general, post and amounts (with general.enabled and
post.enabled as the feature toggles); update the corresponding schema/template
(config.template.json) and the config-fields.ts to remove references to
tipping.enabled so runtime validation and UI fields align with the type.

auth: {
enabled: boolean;
methods: string[];
Expand Down
Loading
Loading