docs: update implementation plan with code review feedback

- Add Button import in App.tsx
- Enhance confirmation dialog with selected storage types
- Add color="error" to confirm button
- Add httponly/secure cookies test to checklist
- Add localhost test to checklist

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
雨霖铃
2026-03-20 00:45:00 +08:00
parent f530cfa7ac
commit 480af5f969
@@ -673,14 +673,37 @@ export default function StorageCleanerPage() {
}} }}
> >
<Typography variant="h6"></Typography> <Typography variant="h6"></Typography>
<Typography variant="body2" color="text.secondary" sx={{ textAlign: 'center' }}> <Typography variant="body2" color="text.secondary" sx={{ textAlign: 'center', mb: 1 }}>
</Typography>
<Box sx={{ mb: 1 }}>
{options.localStorage && (
<Typography variant="body2">- localStorage</Typography>
)}
{options.sessionStorage && (
<Typography variant="body2">- sessionStorage</Typography>
)}
{options.indexedDB && <Typography variant="body2">- IndexedDB</Typography>}
{options.cookies && <Typography variant="body2">- Cookies</Typography>}
{options.cacheStorage && (
<Typography variant="body2">- Cache Storage</Typography>
)}
{options.serviceWorkers && (
<Typography variant="body2">- Service Workers</Typography>
)}
</Box>
<Typography
variant="body2"
color="text.secondary"
sx={{ textAlign: 'center', mb: 1 }}
>
</Typography> </Typography>
<Box sx={{ display: 'flex', gap: 1 }}> <Box sx={{ display: 'flex', gap: 1 }}>
<Button variant="outlined" onClick={() => setShowConfirm(false)}> <Button variant="outlined" onClick={() => setShowConfirm(false)}>
</Button> </Button>
<Button variant="contained" onClick={handleClean}> <Button variant="contained" color="error" onClick={handleClean}>
</Button> </Button>
</Box> </Box>
@@ -721,7 +744,7 @@ git commit -m "feat: add StorageCleanerPage component"
```typescript ```typescript
import { useState } from 'react'; import { useState } from 'react';
import { Box } from '@mui/material'; import { Box, Button } from '@mui/material';
import TimestampPage from './pages/TimestampPage'; import TimestampPage from './pages/TimestampPage';
import StorageCleanerPage from './pages/StorageCleanerPage'; import StorageCleanerPage from './pages/StorageCleanerPage';
import './App.css'; import './App.css';
@@ -814,10 +837,12 @@ After implementation, verify:
- [ ] All storage type checkboxes toggle correctly - [ ] All storage type checkboxes toggle correctly
- [ ] Auto refresh checkbox persists across sessions - [ ] Auto refresh checkbox persists across sessions
- [ ] Clear confirmation dialog appears - [ ] Clear confirmation dialog appears
- [ ] Confirmation dialog shows selected storage types
- [ ] localStorage clears successfully - [ ] localStorage clears successfully
- [ ] sessionStorage clears successfully - [ ] sessionStorage clears successfully
- [ ] IndexedDB clears successfully (or shows error if unavailable) - [ ] IndexedDB clears successfully (or shows error if unavailable)
- [ ] Cookies clear successfully - [ ] Cookies clear successfully
- [ ] Clear httponly and secure cookies
- [ ] Cache Storage clears successfully - [ ] Cache Storage clears successfully
- [ ] Service Workers unregister successfully - [ ] Service Workers unregister successfully
- [ ] Result message displays correctly - [ ] Result message displays correctly
@@ -826,6 +851,7 @@ After implementation, verify:
- [ ] Manual refresh button appears when auto-refresh is off - [ ] Manual refresh button appears when auto-refresh is off
- [ ] Restricted pages show error message - [ ] Restricted pages show error message
- [ ] Snackbar notifications appear correctly - [ ] Snackbar notifications appear correctly
- [ ] Test on localhost
--- ---