subh05sus avatar

gptmarlon-admin

0 subscribers
TypeScriptJavaScriptCSS
Live activities

Implemented a more robust PDF generation layout by setting @page margins to zero to eliminate unwanted whitespace leaks. Content is now contained within a .sheet wrapper utilizing padding and box-decoration-break: clone to ensure consistent margins across fragmented pages. This approach provides better control over multi-page print layouts while maintaining the required visual styling. CSS layout frustration

We removed the aggressive s-maxage cache from our PDF generation route, which was causing stale guide layouts to persist in Vercel's CDN for up to 24 hours. By updating to max-age=60 and restricting caching to the browser, we ensure that every request fetches the latest template from storage. We also bumped the TEMPLATE_REV to clear out any remaining cached artifacts, ensuring consistent rendering across all guides. Caching is hard

The PDF generation logic was incorrectly mapping all non-tip callout types to the 'warning' class, resulting in incorrect red styling for informational boxes like requirements and disclaimers. I introduced a refined calloutClass() function that specifically isolates 'warning' callouts for red styling, while defaulting others to a neutral ink-bar design. This ensures that only true warnings stand out visually in the generated documents. Fixing the styling

The PDF cache was previously only keyed by guide version, causing issues where redesigned templates would not force a re-render for existing content. I have added a TEMPLATE_REV constant to the cache key in lib/pdf-storage.ts, which can be manually bumped when the PDF design changes to ensure users receive the latest rendered version. Drakeposting

The on-demand PDF generation routes were failing on Vercel because the runtime environment could not locate the browser binary packed by @sparticuz/chromium. Since the package's internal path resolution wasn't detectable by @vercel/nft, we've updated next.config.ts to explicitly include the package in the output file tracing. This ensures the necessary binary is correctly bundled and available at runtime. Successful Deployment

Fixed an issue where the "Download as PDF" button was returning 404s for newer guides by implementing a new dynamic route at app/guides/pdf/[slug]/route.ts. This route dynamically generates and caches PDFs on-demand for guides authored via MCP, ensuring a seamless download experience. Existing static PDFs remain unaffected, while new guides now automatically support PDF export. PDF generation struggles

Added support for preselecting guide categories directly from the URL using #hash or ?cat= parameters in lib/guides-html.ts. The implementation includes lenient slug matching, allowing users to land on specific guide categories like 'Claude Basics' automatically. This improvement powers more granular navigation from the homepage and ensures a better user experience for linking to specific content. It works!

Updated CLAUDE.md to document the recent site redesign, including the transition to the re-tuned GPTMarlon-Site token set. The existing rendering logic in lib/guides-html.ts remains compatible, requiring no changes. Documentation check

Introduced non-blocking gate checks for guide authoring to enforce style, structure, and readability standards, including automated warnings for emoji usage and repetitive phrasing. These checks surface in draft reports without preventing publication. Additionally, the table of contents has been redesigned with a more efficient, responsive layout, featuring an accordion-style desktop view and a floating mobile interface. Quality over quantity

Added a postinstall script to automatically run prisma generate whenever dependencies are updated. This ensures that the generated Prisma client is always in sync with the schema without requiring manual intervention. I'm gonna do what's called a programmer move.

We've improved search engine discoverability for guide pages by implementing canonical URL tags and dynamic JSON-LD structured data. The new lib/guide-structured-data.ts utility intelligently categorizes content as either 'HowTo' or 'Article' based on structural block content, ensuring Google receives the most accurate metadata. This update significantly improves how guides are indexed and presented in search results. SEO improvements

Updated CLAUDE.md to include documentation for the newly implemented Block 3 features, including autosave, undo/redo, list search/sort, version diffs, and empty-state guidance. This ensures clear context for future agent interactions regarding these structural improvements in the admin editor.

Added a new diff view for guide versions, allowing administrators to visualize changes between consecutive document versions by tracking block-level additions, removals, and modifications using unique IDs. The implementation leverages the diff library for word-level granularity and strips HTML tags to ensure a clear, readable comparison of content changes. Additionally, updated sanitize-html to version 2.17.7 to resolve a moderate XSS vulnerability. Code success

We've added robust UX features to the canvas editor, including a debounced autosave mechanism and a custom undo/redo system specifically scoped to structural changes. By handling undo/redo at the parent level, we ensure clean separation from native iframe text editing. We also added an empty-state prompt to help users get started more quickly. When the code finally works after implementing undo/redo

Updated CLAUDE.md to include documentation for the four new block types (faq, comparison, image, video) added in the recent Block 2 update. The documentation also covers the new canvas editor features, including drag-to-reorder, keyboard shortcuts, and the updated MigrationReport component.

Improved canvas interaction by introducing keyboard shortcuts for common block operations. Users can now use Cmd/Ctrl+Enter to insert a block, Alt+Up/Down to reorder, and Cmd/Ctrl+Backspace to delete empty blocks safely. These shortcuts leverage existing message patterns to ensure consistent behavior across the editor. Efficiency boost

Added drag-and-drop functionality to the canvas editor by implementing a custom pointer-based handler that communicates via postMessage. Because the canvas operates across an iframe boundary, standard React-based libraries like @dnd-kit were not viable; the solution now sends a validated block order update to the parent container. Additionally, fixed a selection bug in closestBlock() where it was incorrectly targeting child elements instead of the main .cv-block wrapper. Drag and drop is simple

- End of feed -