const fs = require('fs'); const path = require('path'); const filePath = path.join(__dirname, '..', 'components', 'notes-tabs-view.tsx'); let lines = fs.readFileSync(filePath, 'utf8').split('\r\n'); // Line 977 (index 976) closes the scrollable div // Line 978 (index 977) closes the left panel div // We need to: // 1. After the scrollable (index 976), add )} to close {listOpen && (... // 2. Add expand button JSX // 3. Then close left panel div const expandButton = [ ' )}', ' {/* Expand button shown in collapsed state */}', ' {!listOpen && (', '
', ' setListOpen(true)}', ' title="Afficher la liste"', ' >', ' ', ' ', '
', ' )}', ]; // Insert after index 976 (which is ' ' - the scrollable div close) // and remove the original ' ' at index 977 (left panel close) // then re-add left panel close lines.splice(977, 1, ...expandButton, ' '); fs.writeFileSync(filePath, lines.join('\r\n')); console.log('Done, total lines:', lines.length);