Skip to content

Commit f83a767

Browse files
WangYuTenggclaude
andcommitted
fix(student-attempt): drop duplicate save indicator in header card
Both the header card and the sticky floating indicator rendered a SaveIndicator at the top of the page, so users saw "Not saved yet" twice side by side. Keep only the sticky one — it stays visible when scrolled, which is what the user needs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 297219e commit f83a767

1 file changed

Lines changed: 12 additions & 23 deletions

File tree

src/client/features/student-assignment/components/AssignmentHeader.tsx

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -156,31 +156,20 @@ export function AssignmentHeader({
156156
</div>
157157
)}
158158
<div className="bg-white shadow rounded-lg p-6">
159-
<div className="flex justify-between items-start">
160-
<div className="flex-1">
161-
<h1 className="text-2xl font-bold text-gray-900">{assignment.title}</h1>
162-
{assignment.description && <p className="mt-2 text-gray-600">{assignment.description}</p>}
163-
{dueDate && <p className="mt-2 text-sm text-gray-500">Due: {dueDate.toLocaleString()}</p>}
164-
<div className="mt-3 flex flex-wrap items-center gap-2">
165-
<span className="text-sm font-medium text-gray-700">
166-
{assignment.questionCount} question{assignment.questionCount === 1 ? '' : 's'}
159+
<div className="flex-1">
160+
<h1 className="text-2xl font-bold text-gray-900">{assignment.title}</h1>
161+
{assignment.description && <p className="mt-2 text-gray-600">{assignment.description}</p>}
162+
{dueDate && <p className="mt-2 text-sm text-gray-500">Due: {dueDate.toLocaleString()}</p>}
163+
<div className="mt-3 flex flex-wrap items-center gap-2">
164+
<span className="text-sm font-medium text-gray-700">
165+
{assignment.questionCount} question{assignment.questionCount === 1 ? '' : 's'}
166+
</span>
167+
{visibleQuestionTypes.map((type) => (
168+
<span key={type} className={getQuestionTypeBadgeClasses(type)}>
169+
{assignment.questionTypeCounts[type]} {QUESTION_TYPE_LABELS[type]}
167170
</span>
168-
{visibleQuestionTypes.map((type) => (
169-
<span key={type} className={getQuestionTypeBadgeClasses(type)}>
170-
{assignment.questionTypeCounts[type]} {QUESTION_TYPE_LABELS[type]}
171-
</span>
172-
))}
173-
</div>
171+
))}
174172
</div>
175-
{!submitted && (
176-
<div className="shrink-0">
177-
<SaveIndicator
178-
status={saveStatus}
179-
lastSaved={lastSaved ?? null}
180-
onRetry={onRetrySave}
181-
/>
182-
</div>
183-
)}
184173
</div>
185174
{isPastDue && (
186175
<div className="mt-4 rounded-md bg-yellow-50 p-4">

0 commit comments

Comments
 (0)