Render Recommendation as nested sub-bullet under its Issue
Recommendation lines are now displayed as an indented nested bullet beneath their parent Issue bullet, keeping them visually grouped together while giving each Recommendation its own bullet marker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a906b093d1
commit
acd591fb8e
1 changed files with 21 additions and 13 deletions
|
|
@ -74,9 +74,6 @@ const formatFeedbackText = (text: string): React.ReactNode => {
|
|||
if (bulletGroups.length === 0) {
|
||||
// Haven't started bullets yet — it's intro text
|
||||
introLines.push(trimmed);
|
||||
} else if (/^\*{0,2}Recommendation:/.test(trimmed)) {
|
||||
// Recommendation line gets its own bullet
|
||||
bulletGroups.push([trimmed]);
|
||||
} else {
|
||||
// Continuation line within the current bullet
|
||||
bulletGroups[bulletGroups.length - 1].push(trimmed);
|
||||
|
|
@ -91,16 +88,27 @@ const formatFeedbackText = (text: string): React.ReactNode => {
|
|||
)}
|
||||
{bulletGroups.length > 0 && (
|
||||
<ul className="list-disc list-inside space-y-3">
|
||||
{bulletGroups.map((group, index) => (
|
||||
<li key={index}>
|
||||
{group.map((line, lineIdx) => (
|
||||
<React.Fragment key={lineIdx}>
|
||||
{lineIdx > 0 && <br />}
|
||||
{renderBoldMarkdown(line)}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</li>
|
||||
))}
|
||||
{bulletGroups.map((group, index) => {
|
||||
const mainLines = group.filter(line => !/^\*{0,2}Recommendation:/.test(line));
|
||||
const recLines = group.filter(line => /^\*{0,2}Recommendation:/.test(line));
|
||||
return (
|
||||
<li key={index}>
|
||||
{mainLines.map((line, lineIdx) => (
|
||||
<React.Fragment key={lineIdx}>
|
||||
{lineIdx > 0 && <br />}
|
||||
{renderBoldMarkdown(line)}
|
||||
</React.Fragment>
|
||||
))}
|
||||
{recLines.length > 0 && (
|
||||
<ul className="list-disc list-inside ml-6 mt-1">
|
||||
{recLines.map((line, lineIdx) => (
|
||||
<li key={lineIdx}>{renderBoldMarkdown(line)}</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue