fix(ui): normalize issue draft markdown

This commit is contained in:
joshpatra committed 2026-04-18 22:30:31 -04:00
1 parent ca9813f1ea
commit 34d307fd4e
3 files changed
+66 -40

No files matched your search

+29 -19
View File
@@ -7,42 +7,52 @@ assignees: SoPat712
---
**Describe the bug**
## Describe the bug
A clear and concise description of what the bug is.
**To Reproduce**
## To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
2. Click on '...'
3. Scroll down to '...'
4. See error
**Expected behavior**
## Expected behavior
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
## Additional context
**Details (please complete the following information):**
- Version [e.g. v1.1.3]
- Client [e.g. Feishin]
Add any other context, screenshots, or surrounding details here.
<details>
## Safe diagnostics from Allstarr
<summary>Please paste your docker-compose.yaml in between the tickmarks</summary>
- Sensitive values stay redacted in this block.
- Allstarr Version: [e.g. v1.5.3]
- Backend Type: [e.g. Jellyfin]
- Music Service: [e.g. SquidWTF]
- Storage Mode: [e.g. Cache]
- Download Mode: [e.g. Track]
- Redis Enabled: [e.g. Yes]
- Spotify Import Enabled: [e.g. Yes]
- Scrobbling Enabled: [e.g. Disabled]
- Spotify Status: [e.g. Spotify Ready]
- Jellyfin URL: [Configured (redacted) or Not configured]
- Client: [e.g. Firefox 149 on macOS]
- Generated At (UTC): [e.g. 2026-04-19T02:18:52.483Z]
- Browser Time Zone: [e.g. America/New_York]
## docker-compose.yaml (optional)
```yaml
```
</details>
<details>
<summary>Please paste your .env file REDACTED OF ALL PASSWORDS in between the tickmarks:</summary>
## .env (redacted, optional)
```env
```
</details>
**Additional context**
Add any other context about the problem here.
+27 -6
View File
@@ -7,14 +7,35 @@ assignees: SoPat712
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Problem to solve
A clear and concise description of the problem this feature should solve.
## Solution you'd like
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
## Alternatives considered
A clear and concise description of any alternative solutions or workarounds you've considered.
## Additional context
**Additional context**
Add any other context or screenshots about the feature request here.
## Safe diagnostics from Allstarr (optional)
- Sensitive values stay redacted in this block.
- Allstarr Version: [e.g. v1.5.3]
- Backend Type: [e.g. Jellyfin]
- Music Service: [e.g. SquidWTF]
- Storage Mode: [e.g. Cache]
- Download Mode: [e.g. Track]
- Redis Enabled: [e.g. Yes]
- Spotify Import Enabled: [e.g. Yes]
- Scrobbling Enabled: [e.g. Disabled]
- Spotify Status: [e.g. Spotify Ready]
- Jellyfin URL: [Configured (redacted) or Not configured]
- Client: [e.g. Firefox 149 on macOS]
- Generated At (UTC): [e.g. 2026-04-19T02:18:52.483Z]
- Browser Time Zone: [e.g. America/New_York]
+10 -15
View File
@@ -173,9 +173,6 @@ function getReportState() {
function renderIssueBody(state, includeDiagnostics = true) {
const diagnostics = getDiagnostics();
const diagnosticsLines = [
"<details>",
"<summary>Safe diagnostics from Allstarr</summary>",
"",
"- Sensitive values stay redacted in this block.",
`- Allstarr Version: ${diagnostics.version}`,
`- Backend Type: ${diagnostics.backendType}`,
@@ -193,33 +190,31 @@ function renderIssueBody(state, includeDiagnostics = true) {
`- Client: ${diagnostics.client}`,
`- Generated At (UTC): ${diagnostics.generatedAt}`,
`- Browser Time Zone: ${diagnostics.timezone}`,
"",
"</details>",
];
const diagnosticsMarkdown = diagnosticsLines.filter(Boolean).join("\n");
if (state.type === "feature") {
const sections = [
[
"**Is your feature request related to a problem? Please describe.**",
"## Problem to solve",
state.primary || "_Please describe the problem you want to solve._",
],
[
"**Describe the solution you'd like**",
"## Solution you'd like",
state.secondary || "_Please describe the solution you want._",
],
[
"**Describe alternatives you've considered**",
"## Alternatives considered",
state.tertiary || "_Please describe alternatives or workarounds you've considered._",
],
[
"**Additional context**",
"## Additional context",
state.context || "_Add any other context, screenshots, or examples here._",
],
];
if (includeDiagnostics) {
sections.push(["**Environment**", diagnosticsMarkdown]);
sections.push(["## Safe diagnostics from Allstarr", diagnosticsMarkdown]);
}
return sections.map(([heading, content]) => `${heading}\n${content}`).join("\n\n");
@@ -227,26 +222,26 @@ function renderIssueBody(state, includeDiagnostics = true) {
const sections = [
[
"**Describe the bug**",
"## Describe the bug",
state.primary || "_Please describe the bug._",
],
[
"**To Reproduce**",
"## To Reproduce",
state.secondary ||
"_Please list the steps needed to reproduce the issue._",
],
[
"**Expected behavior**",
"## Expected behavior",
state.tertiary || "_Please describe what you expected to happen._",
],
[
"**Additional context**",
"## Additional context",
state.context || "_Add any other context, screenshots, or examples here._",
],
];
if (includeDiagnostics) {
sections.push(["**Details**", diagnosticsMarkdown]);
sections.push(["## Safe diagnostics from Allstarr", diagnosticsMarkdown]);
}
return sections.map(([heading, content]) => `${heading}\n${content}`).join("\n\n");