docs: update AGENTS.md with completed state
This commit is contained in:
@@ -15,61 +15,121 @@ phpfilebrowser/
|
|||||||
|
|
||||||
## Current State
|
## Current State
|
||||||
|
|
||||||
**Step 1 — Project Setup:** `in_progress` (2026-06-09)
|
**Step 1 — Project Setup:** `completed` (2026-06-09 16:30)
|
||||||
- Project directory created
|
- ✅ Project directory created
|
||||||
- AGENTS.md created
|
- ✅ AGENTS.md created
|
||||||
- Git repo not yet initialized
|
- ✅ .gitignore created
|
||||||
- Gitea remote not yet configured
|
- ✅ Git init + push to Gitea
|
||||||
|
|
||||||
|
**Step 2 — PHP Backend:** `completed` (2026-06-09 16:30)
|
||||||
|
- ✅ Directory listing via `?action=list&path=...`
|
||||||
|
- ✅ File download via `?action=download&file=...`
|
||||||
|
- ✅ Configurable ENTRY_POINT (default: `/tmp`)
|
||||||
|
- ✅ Path traversal protection (realpath + ENTRY_POINT prefix check)
|
||||||
|
- ✅ Metadata: name, type, size, modified
|
||||||
|
|
||||||
|
**Step 3 — Frontend CSS:** `completed` (2026-06-09 16:30)
|
||||||
|
- ✅ Dark theme with CSS variables (--bg-primary, --accent, etc.)
|
||||||
|
- ✅ Responsive table (columns hidden on small screens)
|
||||||
|
- ✅ Toolbar with nav buttons, breadcrumb, filter, sort selector
|
||||||
|
- ✅ Media overlay with backdrop blur
|
||||||
|
- ✅ Inline SVG file-type icons
|
||||||
|
- ✅ Custom scrollbar styling
|
||||||
|
- ✅ Mobile-first responsive breakpoints (768px, 480px)
|
||||||
|
|
||||||
|
**Step 4 — Table & Sorting:** `completed` (2026-06-09 16:30)
|
||||||
|
- ✅ Directory listing loaded via fetch()
|
||||||
|
- ✅ Sortable columns (name, date, size) with asc/desc toggle
|
||||||
|
- ✅ Directories always sorted first
|
||||||
|
- ✅ Sort state synced with dropdown selector
|
||||||
|
- ✅ Sort indicator arrows in headers
|
||||||
|
|
||||||
|
**Step 5 — Filtering:** `completed` (2026-06-09 16:30)
|
||||||
|
- ✅ Text filter with 150ms debounce
|
||||||
|
- ✅ Case-insensitive substring match
|
||||||
|
- ✅ Empty state with helpful message
|
||||||
|
|
||||||
|
**Step 6 — Media Player Overlay:** `completed` (2026-06-09 16:30)
|
||||||
|
- ✅ Image preview (img tag, object-fit: contain)
|
||||||
|
- ✅ Audio player (controls + autoplay)
|
||||||
|
- ✅ Video player (controls + autoplay)
|
||||||
|
- ✅ Close via button, backdrop click, or Escape key
|
||||||
|
- ✅ Media playback stops on close
|
||||||
|
|
||||||
|
**Step 7 — Download Trigger:** `completed` (2026-06-09 16:30)
|
||||||
|
- ✅ Non-media files trigger browser download
|
||||||
|
- ✅ PHP sets Content-Disposition header
|
||||||
|
- ✅ Client-side: dynamic <a> element click
|
||||||
|
|
||||||
|
**Step 8 — Browser Navigation:** `completed` (2026-06-09 16:30)
|
||||||
|
- ✅ History stack for back/forward buttons
|
||||||
|
- ✅ URL reflects current directory via query params
|
||||||
|
- ✅ popstate listener for browser back/forward
|
||||||
|
- ✅ Breadcrumb navigation (clickable path segments)
|
||||||
|
- ✅ Nav buttons disabled at boundaries
|
||||||
|
|
||||||
|
**Git Repository:** `completed`
|
||||||
|
- ✅ Pushed to https://git.jlserver.de/JLtec/phpfilebrowser.git
|
||||||
|
- ✅ Commit: `7bb9b9b` — feat: initial phpfilebrowser
|
||||||
|
|
||||||
## Implementation Plan
|
## Implementation Plan
|
||||||
|
|
||||||
### Step 1: Project Setup
|
### Step 1: Project Setup
|
||||||
- [x] Create project directory
|
- [x] Create project directory
|
||||||
- [x] Create AGENTS.md
|
- [x] Create AGENTS.md
|
||||||
- [ ] Create .gitignore
|
- [x] Create .gitignore
|
||||||
- [ ] Git init, configure, push to Gitea
|
- [x] Git init, configure, push to Gitea
|
||||||
|
|
||||||
### Step 2: PHP Backend (`index.php` — backend portion)
|
### Step 2: PHP Backend (`index.php` — backend portion)
|
||||||
- [ ] Read directory contents (realpath-based, no traversal)
|
- [x] Read directory contents (realpath-based, no traversal)
|
||||||
- [ ] Return JSON for current directory listing
|
- [x] Return JSON for current directory listing
|
||||||
- [ ] Handle relative path from query param (`?path=`)
|
- [x] Handle relative path from query param (`?path=`)
|
||||||
- [ ] Return metadata: name, type (dir/file), size, modified date
|
- [x] Return metadata: name, type (dir/file), size, modified date
|
||||||
|
|
||||||
### Step 3: Frontend — CSS (dark, modern, responsive)
|
### Step 3: Frontend — CSS (dark, modern, responsive)
|
||||||
- [ ] Dark color scheme with CSS variables
|
- [x] Dark color scheme with CSS variables
|
||||||
- [ ] Responsive table layout (stack on mobile)
|
- [x] Responsive table layout (stack on mobile)
|
||||||
- [ ] Navigation bar with breadcrumb
|
- [x] Navigation bar with breadcrumb
|
||||||
- [ ] Back/Forward browser-style navigation buttons
|
- [x] Back/Forward browser-style navigation buttons
|
||||||
- [ ] Filter input styling
|
- [x] Filter input styling
|
||||||
- [ ] Media player overlay styling
|
- [x] Media player overlay styling
|
||||||
- [ ] Sortable column headers with indicators
|
- [x] Sortable column headers with indicators
|
||||||
- [ ] File type icons (inline SVG)
|
- [x] File type icons (inline SVG)
|
||||||
|
|
||||||
### Step 4: Frontend — Table & Sorting
|
### Step 4: Frontend — Table & Sorting
|
||||||
- [ ] Render file/folder table from JSON data
|
- [x] Render file/folder table from JSON data
|
||||||
- [ ] Clickable rows (folders navigate, files trigger action)
|
- [x] Clickable rows (folders navigate, files trigger action)
|
||||||
- [ ] Client-side sort by name, date, size (asc/desc)
|
- [x] Client-side sort by name, date, size (asc/desc)
|
||||||
- [ ] Sort state persisted in filter bar
|
- [x] Sort state persisted in filter bar
|
||||||
|
|
||||||
### Step 5: Frontend — Filtering
|
### Step 5: Frontend — Filtering
|
||||||
- [ ] Text filter input (regex or substring match)
|
- [x] Text filter input (substring match)
|
||||||
- [ ] Filter applied to table rows in real-time
|
- [x] Filter applied to table rows in real-time
|
||||||
|
|
||||||
### Step 6: Frontend — Media Player Overlay
|
### Step 6: Frontend — Media Player Overlay
|
||||||
- [ ] Detect media file types (audio/video/image)
|
- [x] Detect media file types (audio/video/image)
|
||||||
- [ ] Open overlay with embedded `<audio>`, `<video>`, or `<img>`
|
- [x] Open overlay with embedded `<audio>`, `<video>`, or `<img>`
|
||||||
- [ ] Close button, backdrop click to close
|
- [x] Close button, backdrop click to close
|
||||||
- [ ] Overlay is large (centered, max-width constraint)
|
- [x] Overlay is large (centered, max-width constraint)
|
||||||
|
|
||||||
### Step 7: Frontend — Download Trigger
|
### Step 7: Frontend — Download Trigger
|
||||||
- [ ] Non-media files trigger browser download
|
- [x] Non-media files trigger browser download
|
||||||
- [ ] Use `download` parameter in URL: `?file=...&download=1`
|
- [x] PHP handles Content-Disposition header
|
||||||
- [ ] PHP handles Content-Disposition header
|
|
||||||
|
|
||||||
### Step 8: Browser Navigation
|
### Step 8: Browser Navigation
|
||||||
- [ ] Push state to history on directory change
|
- [x] Push state to history on directory change
|
||||||
- [ ] Back/Forward buttons in toolbar
|
- [x] Back/Forward buttons in toolbar
|
||||||
- [ ] URL reflects current directory: `?path=/sub/dir`
|
- [x] URL reflects current directory: `?path=/sub/dir`
|
||||||
|
|
||||||
|
## Completed
|
||||||
|
All 8 implementation steps done. Pushed to https://git.jlserver.de/JLtec/phpfilebrowser.git
|
||||||
|
|
||||||
|
## Next Steps (Optional)
|
||||||
|
- Configure ENTRY_POINT to desired root directory
|
||||||
|
- Deploy to web server (Nginx/Apache)
|
||||||
|
- Add `.htaccess` for clean URLs
|
||||||
|
- Add search-by-extension filter dropdown
|
||||||
|
- Add file permissions display
|
||||||
|
|
||||||
## Agent Instructions
|
## Agent Instructions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user