sebastian

sebastian a commité dans master sur sebastian/PackIt

  • 3badc35adf Fix empty Zombie-Apokalypse list and translate its items to German Migration 002 looked item groups and items up by their English sample-data names, so on a database with its own German groups the hidden activity got no items. Migration 003 rebuilds the list: items go into their German group or, if it is missing, a new "Zombie-Abwehr" group; existing items are reused; the English items 002 created are removed. It is safe to rerun. Adds a few more items (Twinkies, Knoblauch, Gartenzwerg zur Ablenkung, ...) and renames the activity to Zombie-Apokalypse in the group Überleben. The progress nag no longer lowercases item names, which mangled German nouns ("the stirnlampe"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • 6ed62b87d1 Add nagging progress messages and a hidden Zombie apocalypse activity The packing list now shows a short, stage-dependent line under the progress bar, from "The tent won't pack itself." to "Done! Go on, touch some grass." Activities can be flagged hidden in the admin panel. Hidden activities are left off the selection page until someone clicks "Pack it!" ten times in quick succession with nothing selected. The Pack button is now aria-disabled instead of disabled so those clicks register. Sample data and migration 002 add a hidden "Zombie apocalypse" activity with its own items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • b46705174a Show mapping counts on the items page and make the list sortable The items table said nothing about how an item is used, so deciding whether one is safe to delete or rename meant going to the mappings page and reading every activity. A Mappings column now carries the count from activity_item_map, as a badge, or a muted 0 for items no activity uses at all -- the ones actually worth spotting. With 35 items and growing, the fixed group-then-sort-order sequence was also the only way to read the table. The five named columns are now clickable headers cycling ascending, descending and back to the server's order; that third state exists because group, sort order and ID together are not reproducible from any single column, so without it there is no way back. Rows carry their sort keys as data attributes, so the comparator never parses the view/edit markup in the cells, and ties fall back to the server order -- sorting by Group still lists each group's items in their configured sequence. Names use Intl.Collator, so case and umlauts sort the way they read. The chosen sort is kept in sessionStorage: saving an item redirects back to items.php, and without that the table snapped back to the default after every edit. Storage access is guarded, so a private window loses the persistence rather than the sorting. The arrow indicator is driven off aria-sort, and headers are focusable and take Enter and Space. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • Comparer ces 3 commits »

il y a 2 semaines

sebastian a commité dans master sur sebastian/PackIt

  • 7e2c7d34b6 Persist checklists offline, protect admin writes, harden config and links Four fixes, all exercised against a throwaway copy of the production database. Checklist state and offline support Ticks were DOM-only, so a reload or an evicted tab lost the lot -- on the one screen people use over hours. They are now stored per list hash in localStorage and restored on load, with ids for items no longer on the list pruned. Every storage access is guarded, so a private window degrades to not remembering rather than breaking. A Reset button appears once something is ticked. sw.js caches the shell and every list already opened, which is what makes an installed PackIt useful where there is no signal. Navigations are network-first so an online visit still reflects the latest admin changes; redirected responses are not cached, as a replayed redirect breaks navigation. The admin panel is never cached. CSRF, session and login throttling Every admin POST acted on $_POST['action'] with no token check: any page an admin visited while logged in could delete the item catalogue. All 16 POST forms now carry a per-session token and all 6 handlers verify it, login.php included. The session cookie is HttpOnly, SameSite=Strict, scoped to /admin/ and Secure over HTTPS. The old sleep(1) is replaced by a logged attempt table: 10 failures from one IP in 15 minutes locks that IP out. Failures against a username buy a growing delay instead of a lockout, because locking the username would let anyone shut the real admin out of the panel. Error exposure and credentials display_errors was forced on and db.php printed the raw PDO message, so a dropped connection showed visitors the host, database and user. db.php is now the bootstrap: $appEnv drives error display, with fail_hard() and an exception handler logging the cause and showing a generic message. Anything but the exact string 'development' is production, so a typo fails closed. config.php is untracked and git-ignored, with config.sample.php as the template. The password in it is still in git history and needs rotating separately. Collision-safe short links A 5-character SHA-256 prefix collides in the low thousands of lists, and the UNIQUE column turned that into an uncaught PDOException instead of a list. allocate_selection_hash() walks the prefix from 5 to 16 characters, reusing the length already ours and stepping up only on a real collision; the insert race is caught and re-checked. The column drops from CHAR(64) to VARCHAR(16), left over from the old long hashes, and activity_ids gets the index every list creation needs. Existing databases need migrations/001_hardening.sql; it deletes rows still holding a 64-character hash, which packing.php has rejected since links were shortened. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • 8361662f70 Group activities by category in the mappings selector Long activity names overflowed the fixed-width selector box, pushing the floated category label onto a second line where the selection border cut through it. List each category once as a heading and its activities below, and let the links wrap inside their own border. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • 9f70eb8799 Keep admin sidebar fixed to the window height The sidebar stretched with the document, so on long pages the logout button sat at the bottom of the content and was only reachable after scrolling. Make it a sticky, viewport-tall column that scrolls internally if it ever gets taller than the window. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • 3e3e354276 Warn about similar items when adding or renaming an item The items admin page had no way to tell whether a name already existed, which made near-duplicates easy to create — especially with German compounds ("Skisocken" vs "Ski Socken") and typos. Both the add form and the inline rename now show an advisory panel listing existing items that resemble what is being typed. Matching folds case, diacritics and punctuation, compares word sets in any order, looks inside compounds, and falls back to a bounded Levenshtein distance so typos still match. An exact match is highlighted, but nothing is ever blocked: the panel only informs, and both writes are unchanged. The item list is already fetched to render the table, so it is reused as embedded JSON — no extra query and no AJAX. In the table the panel floats below the field so rows keep their height while editing, and a row never flags itself or warns until the name actually differs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • f97f2e4917 Fix tick boxes printing as solid black rectangles The print stylesheet lightened the body, rows, titles and pills, but never .item-check, which carries the dark page background. Browsers that print background graphics (Safari, and any print dialog with the option ticked, which is common when saving as PDF) therefore filled every box solid black, leaving nothing to cross by hand. Chrome has the option off by default, which is why this only showed up for some people. The boxes are now explicitly blank on paper, checked rows drop their green fill and keep readable text, and the checkmark uses currentColor so it is white on screen and black in print. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • Comparer ces 6 commits »

il y a 3 semaines

sebastian a commité dans master sur sebastian/PackIt

  • e083222c44 Update ordering of Items when adding them to activity. Alphabetically ordering makes here more sense.

il y a 3 mois

sebastian a commité dans master sur sebastian/PackIt

  • ae07aef641 Fix lingering selection border on Activity page The :hover rule painted the same yellow accent border as the selected state, so deselecting a card while the cursor was still over it left the border visible until another card was selected. Remove the hover mechanism (also unnecessary on touch devices) so the border is driven solely by the checked state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

il y a 3 mois

sebastian a commité dans master sur sebastian/PackIt

  • 45ab8ba776 Updating readme and adding screenshots

il y a 5 mois

sebastian a commité dans master sur sebastian/PackIt

il y a 5 mois

sebastian a commité dans master sur sebastian/PackIt

  • e93962195e Adding quantities for items per mapping table
  • ad20e08324 Refactored inline editing across all admin list pages to render edit fields in-place within each table column instead of a collapsed full-width row.
  • 54e71cb4e7 Inlining editing of items to avoid jumping to the top of the page for each edit
  • 55e32e4583 Using shorter urls (only 5 characters) instead of the 64 for better sharing and reading
  • 4bc06ee390 Readme added
  • Comparer ces 6 commits »

il y a 6 mois

sebastian a commité dans master sur sebastian/backup

  • 0183ad9836 Adding mail notification in case of a script failure Improving reliability Moving log rotation to beginning to avoid accumulation of log files when the script crashes

il y a 6 mois

sebastian a commité dans master sur sebastian/backup

il y a 7 mois

sebastian a commité dans master sur sebastian/backup

il y a 7 mois

sebastian a commité dans master sur sebastian/backup

il y a 7 mois

sebastian a commité dans master sur sebastian/backup

il y a 1 an

sebastian a commité dans master sur sebastian/backup

il y a 1 an

sebastian a commité dans master sur sebastian/PackIt

il y a 1 an

sebastian a commité dans master sur sebastian/PackIt

il y a 1 an

sebastian a commité dans master sur sebastian/PackIt

  • 2c9d74bf68 initial commit for submit_activities.php

il y a 1 an

sebastian a commité dans master sur sebastian/PackIt

  • cd172a4c1b Setting error display first Initial commit for submit_activities.php

il y a 1 an

sebastian a commité dans master sur sebastian/PackIt

  • 5f96b2871b initial activity request and selection

il y a 1 an

sebastian a commité dans master sur sebastian/PackIt

il y a 1 an

sebastian nouvelle branche créée master sur sebastian/PackIt

il y a 1 an