Project

General

Profile

Feature #103

Updated by Rajesh Gotur 22 days ago

--- 
 type: redmine-readme 
 project: Redmine README Sync 
 subject: Chrome Extension – Redmine Story Creation and README Push Workflow 
 story_key: redmine-chrome-extension-story-creation 
 generated_at: 2026-09-30T12:00:00 
 story_type: feature 
 --- 

 # Chrome Extension – Redmine Story Creation and README Push Workflow 

 > Provide a Chrome Manifest V3 extension that converts generated README/story files into controlled Redmine issues, sub-tasks, or updates through a Redmine-aware workflow. 

 --- 

 ## 1. Executive Summary 

 This story covers the Chrome extension layer of **Redmine README Sync**. 

 The extension is the user-facing interface between locally generated project/story documentation and Redmine. It does **not** generate the README, call an AI service, scrape Claude/ChatGPT/Gemini pages, or contain Redmine credentials. Instead, it discovers README files supplied by the backend, lets the user review and configure the target Redmine project and issue operation, performs a dry-run preview, and then asks the backend to create or update the corresponding Redmine issue. 

 The implemented extension is a **Chrome Manifest V3** application written in plain JavaScript with no Node/npm build step. 

 Core story-creation flow: 

 ```text 
 README / Story File 
         | 
         v 
 Chrome Extension 
         | 
         +--> Select README 
         | 
         +--> Suggest project / issue / fields 
         | 
         +--> User reviews or edits values 
         | 
         +--> Preview / dry run 
         | 
         v 
 Backend API 
         | 
         v 
 Redmine permission + validation 
         | 
         +--------------------+ 
         |                      | 
         v                      v 
    Create Issue            Update Issue 
         |                      | 
         +---------+----------+ 
                   | 
                   v 
         Attach README + files 
                   | 
                   v 
           Result / Issue URL 
 ``` 

 The extension also provides supporting Redmine workflows including bulk README push, issue/project management, file attachment, time logging, assignment, history, settings, permissions-aware navigation, duplicate handling, and light/dark themes. 

 The project explicitly keeps AI generation outside the extension. The README is produced by the Claude skill or another workflow and then supplied to the extension as a file. 

 --- 

 ## 2. Jira Story Definition 

 ### User Story 

 **As a Redmine user,**   
 I want to select a generated project README/story from the Chrome extension, choose the appropriate Redmine project and issue operation, review the populated issue fields, preview the operation, and push it to Redmine,   
 **so that project work documented in Markdown can be converted into a Redmine issue without manually copying the story into Redmine.** 

 ### Story Type 

 **Feature** 

 ### Primary Deliverable 

 A Chrome extension that provides a controlled README-to-Redmine story creation workflow. 

 ### Primary Users 

 | User | Expected Use | 
 |---|---| 
 | Redmine Administrator | Create projects, push stories, bulk push, manage issues/files, assign users, log time | 
 | Standard Redmine User | Push stories into assigned projects where their Redmine role permits the action | 
 | Documentation / Development User | Select generated README files and convert them into Redmine issues/sub-tasks/updates | 

 --- 

 ## 3. Business / User Requirement 

 | # | Requirement | Description | Status | 
 |---|---|---|---| 
 | 1 | README selection | Discover and select generated README/story files | Implemented | 
 | 2 | Project selection | Choose an existing Redmine project; administrators may create a new project | Implemented | 
 | 3 | Story creation | Create a new top-level Redmine issue from a README | Implemented | 
 | 4 | Sub-task creation | Create a README as a sub-task under an existing issue | Implemented | 
 | 5 | Existing issue update | Add a dated update/note and versioned README to an existing issue | Implemented | 
 | 6 | Field autofill | Populate subject, tracker, priority, assignee and date/estimate fields from available metadata/defaults | Implemented | 
 | 7 | Preview | Validate the intended operation without sending it to Redmine | Implemented | 
 | 8 | Duplicate protection | Ask Redmine whether the README/files already exist before pushing | Implemented | 
 | 9 | Companion files | Push files associated with a README to the same issue | Implemented | 
 | 10 | Bulk story creation | Push multiple READMEs in one operation | Implemented | 
 | 11 | Permissions-aware UI | Show only actions/projects allowed by the signed-in Redmine account | Implemented | 
 | 12 | Result feedback | Show created/skipped/failed results and the resulting Redmine issue information | Implemented | 
 | 13 | History | Maintain local push history and reconcile it with Redmine | Implemented | 
 | 14 | Redmine management | Provide issue/project/file management functions from the extension | Implemented | 
 | 15 | AI integration inside extension | Generate README content or scrape AI chat pages | Out of Scope | 

 --- 

 ## 4. Problem Statement 

 Before the extension workflow, a generated project story existed as a Markdown document but required manual Redmine entry. 

 Typical manual flow: 

 ```text 
 AI / Documentation Workflow 
         | 
         v 
 README.md generated 
         | 
         v 
 Open Redmine 
         | 
         v 
 Find project 
         | 
         v 
 Create issue 
         | 
         v 
 Copy subject 
         | 
         v 
 Copy README description 
         | 
         v 
 Add attachments 
         | 
         v 
 Select tracker / priority / assignee / dates 
         | 
         v 
 Submit issue 
 ``` 

 This creates several practical problems: 

 - repeated manual copying of story content; 
 - risk of selecting the wrong project; 
 - inconsistent issue metadata; 
 - repeated work when a story already exists; 
 - difficulty handling multiple READMEs; 
 - no controlled dry-run before creating the issue; 
 - no integrated handling of README companion files; 
 - no consistent update/sub-task workflow; 
 - permission handling could become disconnected from actual Redmine access; 
 - a generated README and the Redmine issue could become difficult to reconcile. 

 The extension addresses the workflow problem without moving AI generation into the browser extension. 

 --- 

 ## 5. Objectives 

 1. Provide a focused Chrome UI for README-to-Redmine story creation. 
 2. Allow users to create new issues, sub-tasks, or updates from a README. 
 3. Reuse README metadata and Redmine data to reduce manual field entry. 
 4. Respect the signed-in user's actual Redmine permissions. 
 5. Provide a dry-run/preview before a real push. 
 6. Detect duplicate content before creating another issue. 
 7. Keep README companion files attached to the same story. 
 8. Support both individual and bulk story creation. 
 9. Provide clear success, warning, duplicate, and failure states. 
 10. Keep AI/chat integration outside the extension for portability and reduced coupling. 

 --- 

 ## 6. Scope 

 ### In Scope 

 - Chrome Manifest V3 extension. 
 - README discovery and selection. 
 - README preview. 
 - Existing project selection. 
 - Administrator-only new project flow. 
 - New issue creation. 
 - Sub-task creation. 
 - Existing issue update. 
 - Subject, tracker, priority, assignee, start date, due date and estimated-hours fields. 
 - Project and issue suggestions. 
 - Dry-run preview. 
 - Duplicate detection and Push Anyway handling. 
 - README companion file selection. 
 - Single README push. 
 - Bulk README push. 
 - Redmine-aware permission/capability UI. 
 - Push result display. 
 - Manage tab. 
 - Issue/project/file download and attachment workflows. 
 - Assign workflow where Redmine permits it. 
 - Time logging where Redmine permits it. 
 - Push history. 
 - Settings and theme controls. 
 - Session-aware sign-in/sign-out UI. 
 - Backend API communication. 

 ### Out of Scope 

 - AI/LLM calls from the extension. 
 - Generating README content inside the extension. 
 - Scraping Claude, ChatGPT, Gemini, or other chat pages. 
 - Storing Redmine passwords in the extension. 
 - Storing the Redmine API key in the extension. 
 - Replacing Redmine's permission enforcement. 

 ### Future / External Dependencies 

 - The backend must remain available for API operations. 
 - Redmine REST API must be enabled. 
 - The README/story-generation workflow must produce the expected Markdown files and metadata. 
 - Shared-server deployment requires appropriate HTTPS/reverse-proxy configuration. 

 --- 

 ## 7. Current System / Existing Flow 

 The current architecture deliberately separates story generation from story submission. 

 ```mermaid 
 flowchart LR 
     A["AI Chat / Project Work"] --> B["Claude Skill or Other Documentation Workflow"] 
     B --> C["README.md + Companion Files"] 
     C --> D["Local README Folder / Extension File Input"] 
     D --> E["Chrome Extension"] 
     E --> F["FastAPI Backend"] 
     F --> G["Redmine REST API"] 
     G --> H["Issue / Sub-task / Update"] 
 ``` 

 The extension does not need to know which AI tool generated the README. 

 This makes the workflow compatible with: 

 - Claude; 
 - ChatGPT; 
 - Gemini; 
 - manually created Markdown; 
 - other documentation generators. 

 --- 

 ## 8. Proposed / Implemented Solution 

 ### 8.1 Extension Technology 

 | Component | Implementation | 
 |---|---| 
 | Browser | Google Chrome | 
 | Extension standard | Manifest V3 | 
 | Language | JavaScript | 
 | UI | HTML + CSS + dependency-free JavaScript | 
 | Build system | No Node/npm build step | 
 | Client storage | Chrome `storage.local` | 
 | Backend communication | Fetch / REST API | 
 | Browser permissions | `activeTab`, `storage`, localhost plus optional HTTP/HTTPS origin access | 
 | Minimum Chrome version | 110 | 
 | Extension version in supplied implementation | 4.0.0 | 

 ### 8.2 Main Extension Modules 

 ```text 
 extension/ 
 ├── manifest.json 
 ├── popup.html 
 ├── popup.js 
 ├── popup.css 
 ├── api.js 
 ├── login.js 
 ├── state.js 
 ├── ui.js 
 ├── bulk.js 
 ├── theme.js 
 ├── theme-init.js 
 └── icons/ 
 ``` 

 ### 8.3 Responsibility Split 

 | File | Responsibility | 
 |---|---| 
 | `manifest.json` | Manifest V3 configuration, permissions, popup and icons | 
 | `popup.html` | Extension UI structure and views | 
 | `popup.js` | Main application orchestration, selection, rendering, push flow, manage/history/time workflows | 
 | `api.js` | Backend REST client, authentication/session handling, API errors, file downloads | 
 | `login.js` | Backend address, Redmine username/password sign-in and connection probe | 
 | `state.js` | Shared application state and capability checks | 
 | `bulk.js` | Multiple README queue, validation, progress and batch push | 
 | `ui.js` | Safe DOM helpers, notifications, icons, Markdown/file helpers | 
 | `theme.js` | Theme handling | 
 | `theme-init.js` | Early theme initialization | 
 | `popup.css` | Extension visual design and responsive state styling | 

 --- 

 ## 9. Architecture 

 ```mermaid 
 flowchart TB 
     U["User"] --> X["Chrome Extension"] 

     subgraph EXT["Chrome Extension - Manifest V3"] 
         P["popup.html"] 
         JS["popup.js"] 
         API["api.js"] 
         LOGIN["login.js"] 
         STATE["state.js"] 
         BULK["bulk.js"] 
         UI["ui.js"] 
         THEME["theme.js / theme-init.js"] 

         P --> JS 
         JS --> STATE 
         JS --> API 
         JS --> BULK 
         JS --> UI 
         LOGIN --> API 
         THEME --> P 
     end 

     X --> EXT 
     API --> B["FastAPI Backend"] 

     subgraph BACK["Backend"] 
         AUTH["Authentication / Session"] 
         FILES["README/File Services"] 
         PUSH["Push Services"] 
         RM["Redmine Client"] 
         DB["SQLite History / Mapping"] 
     end 

     B --> AUTH 
     B --> FILES 
     B --> PUSH 
     B --> RM 
     B --> DB 

     RM --> R["Redmine REST API"] 
 ``` 

 ### Architectural Principle 

 The extension is a client, not the system of record. 

 - Redmine remains the authority for projects, issues and permissions. 
 - The backend remains the authority for session/API interaction. 
 - The local README is the source document for the story. 
 - The extension controls user interaction and submission choices. 

 --- 

 ## 10. End-to-End Workflow 

 ### 10.1 Sign-in 

 ```mermaid 
 sequenceDiagram 
     participant U as User 
     participant E as Extension 
     participant B as Backend 
     participant R as Redmine 

     U->>E: Enter backend URL 
     U->>E: Enter Redmine username/password 
     E->>B: POST /auth/login 
     B->>R: Validate credentials 
     R-->>B: User + permissions + API identity 
     B-->>E: Session token + capabilities 
     E->>E: Store session metadata 
     E-->>U: Open application 
 ``` 

 The extension does not retain the password after sign-in and does not receive the Redmine API key. 

 ### 10.2 Single Story Creation 

 ```mermaid 
 flowchart TD 
     A["Open Extension"] --> B["Select README"] 
     B --> C["Load project / issue suggestions"] 
     C --> D["Choose Project"] 
     D --> E{"Issue Operation"} 
     E -->|New| F["Create Top-Level Issue"] 
     E -->|Sub-task| G["Select Parent Issue"] 
     E -->|Update| H["Select Existing Issue"] 
     F --> I["Review Fields"] 
     G --> I 
     H --> I 
     I --> J["Preview / Dry Run"] 
     J --> K{"Duplicate?"} 
     K -->|No| L["Push"] 
     K -->|Yes| M["Review Existing Redmine Location"] 
     M --> N{"Push Anyway?"} 
     N -->|No| O["Stop"] 
     N -->|Yes| L 
     L --> P["Backend"] 
     P --> Q["Redmine"] 
     Q --> R["Result / Issue"] 
 ``` 

 ### 10.3 Bulk Story Creation 

 ```mermaid 
 flowchart LR 
     A["Select Many READMEs"] --> B["Queue"] 
     B --> C["Choose Project"] 
     C --> D["Optional Shared Fields"] 
     D --> E["Validate / Dry Run"] 
     E --> F["Push in Batches"] 
     F --> G["Per-file Result"] 
     G --> H["Created"] 
     G --> I["Skipped / Duplicate"] 
     G --> J["Failed"] 
     G --> K["Unsent"] 
 ``` 

 --- 

 ## 11. Detailed Technical Logic 

 ### 11.1 README Discovery and Selection 

 The extension requests README metadata from the backend. 

 The selection logic supports: 

 - newest unpushed README selection; 
 - explicit file selection; 
 - rescanning; 
 - removing a README from the visible list; 
 - restoring removed README entries; 
 - README preview; 
 - pushed/new/older status indicators; 
 - companion-file count; 
 - front-matter indication. 

 The extension sends opaque file IDs to the backend rather than arbitrary filesystem paths. 

 ### 11.2 Chat Association 

 The extension does not scrape a chat page. 

 When chat remembering is enabled: 

 1. It reads the active tab URL/title using `activeTab`. 
 2. It checks whether the URL contains a stable chat-like identifier. 
 3. It creates a one-way SHA-1-derived chat key from the tab origin/path. 
 4. Only that opaque key and cleaned title are used for backend suggestion/history association. 
 5. A new-chat page without a stable identity is not remembered. 

 This allows project/story associations to persist without granting the extension content-script access to AI websites. 

 ### 11.3 Project Suggestion 

 The backend can provide project suggestions. 

 The extension supports: 

 - existing project selection; 
 - administrator new-project selection; 
 - project search/filter; 
 - project metadata loading; 
 - project permission filtering. 

 For non-administrators, the UI uses **My projects** and does not expose the new-project option. 

 ### 11.4 Issue Modes 

 The extension provides three issue modes: 

 | Mode | Behaviour | 
 |---|---| 
 | New issue | Creates a new top-level Redmine issue | 
 | Sub-task | Creates the story below a selected parent issue | 
 | Update | Updates an existing issue with a dated note/versioned README | 

 A new project can start with a new issue. Sub-task and update operations require an existing project. 

 ### 11.5 Field Autofill 

 The extension displays and allows editing of: 

 - Subject; 
 - Tracker; 
 - Priority; 
 - Assignee; 
 - Start date; 
 - Due date; 
 - Estimated hours. 

 Values can come from: 

 1. README front matter; 
 2. project/application defaults; 
 3. Redmine defaults. 

 User-edited fields are preserved instead of being silently overwritten by later suggestion refreshes. 

 ### 11.6 Parent Issue Selection 

 For sub-task creation, the extension loads issues for the selected project and lets the user search/select the parent. 

 The selected parent is sent as `parent_id`. 

 ### 11.7 Existing Issue Update 

 Update mode targets an existing issue. 

 The update operation is designed to preserve the story history by adding a dated note and attaching a versioned README rather than treating every README revision as a completely unrelated story. 

 ### 11.8 Preview / Dry Run 

 Before a real push, the extension can send a dry-run request. 

 Purpose: 

 - validate project selection; 
 - validate issue mode; 
 - validate metadata; 
 - detect duplicate content; 
 - expose likely errors before creating/updating Redmine data. 

 The preview does not perform the final Redmine write. 

 ### 11.9 Duplicate Detection 

 Duplicate checking is performed against Redmine-backed content rather than relying only on local extension history. 

 The README and companion files can be compared against content already associated with the target project. 

 If a duplicate is detected: 

 ```text 
 Existing Redmine Content 
         | 
         v 
 Extension warning 
         | 
         +--> Review existing issue/file 
         | 
         +--> Do not push 
         | 
         +--> Push anyway 
 ``` 

 The extension exposes a controlled **Push anyway** path rather than silently creating duplicate content. 

 ### 11.10 Companion Files 

 A README can have related files such as: 

 - screenshots; 
 - PDFs; 
 - spreadsheets; 
 - source files; 
 - test reports; 
 - diagrams; 
 - data files. 

 The extension can: 

 - detect files associated with a README; 
 - show them in the attachment area; 
 - allow individual files to be excluded; 
 - add additional files; 
 - send selected files with the README. 

 Files are intended to travel with the same Redmine issue. 

 ### 11.11 Bulk Push 

 Bulk mode supports multiple READMEs in one workflow. 

 The supplied implementation supports up to **50 READMEs per bulk operation**. 

 The UI provides: 

 - drag/drop or file picker; 
 - queue management; 
 - per-file status; 
 - shared project selection; 
 - optional shared tracker/priority/assignee fields; 
 - dry-run validation; 
 - progress bar; 
 - batch processing; 
 - individual created/skipped/failed/unsent results; 
 - retry of failed items; 
 - duplicate override for skipped duplicate items. 

 A failed file does not inherently invalidate the successful files in the same batch. 

 --- 

 ## 12. Data Flow 

 ### Single Story 

 ```text 
 README 
   | 
   | file ID / metadata 
   v 
 Extension State 
   | 
   | project + issue + fields + attachments 
   v 
 buildRequest() 
   | 
   v 
 POST /push 
   | 
   v 
 Backend 
   | 
   v 
 Redmine 
   | 
   +--> Issue 
   +--> Description / note 
   +--> README attachment 
   +--> Companion attachments 
   | 
   v 
 Result 
   | 
   v 
 Extension Result View 
 ``` 

 ### Bulk Story Creation 

 ```text 
 README 1 ─┐ 
 README 2 ─┤ 
 README 3 ─┤ 
 ...         ├──> Bulk Queue ──> Validation ──> /push/bulk ──> Redmine 
 README N ─┘                                        | 
                                                  v 
                                       Per-file result state 
 ``` 

 ### Backend API Contract Used by the Extension 

 Core endpoints include: 

 | Endpoint | Extension purpose | 
 |---|---| 
 | `POST /auth/login` | Sign in | 
 | `POST /auth/logout` | Sign out | 
 | `GET /auth/me` | Restore/check session | 
 | `GET /files` | Discover README files | 
 | `GET /files/{id}` | Read README preview | 
 | `GET /suggest` | Obtain project/issue/default suggestions | 
 | `GET /projects` | Load Redmine-visible projects | 
 | `GET /trackers` | Load trackers | 
 | `GET /priorities` | Load priorities | 
 | `GET /projects/{id}/meta` | Load project metadata/members | 
 | `GET /issues` | Load issues for parent/update selection | 
 | `POST /push` | Single story push | 
 | `POST /push/bulk` | Bulk story push | 
 | `GET /history` | Load push history | 
 | `DELETE /history` | Remove local history entries | 
 | `GET /manage/projects/{id}/issues` | Manage issue listing | 
 | `GET /manage/issues/{id}` | Read issue details | 
 | `PUT /manage/issues/{id}` | Update issue | 
 | `GET /manage/issues/{id}/download` | Download issue package | 
 | `POST /manage/export` | Export project issues | 
 | `POST /manage/attachments` | Attach file | 
 | `POST /time-entries` | Log time | 

 --- 

 ## 13. Key Functional Behaviour 

 ### 13.1 Permission-Aware Navigation 

 The extension derives visible capabilities from the authenticated account. 

 Examples: 

 ```text 
 push_readme 
 bulk_push 
 assign_members 
 create_users 
 log_time 
 view_history 
 edit_project 
 upload_project_files 
 create_project 
 ``` 

 The UI hides or disables functions when the backend reports that the user does not have the corresponding capability. 

 Redmine remains the final authority and can still reject an operation. 

 ### 13.2 My Projects Rule 

 For non-administrators: 

 ```text 
 Redmine Memberships 
         | 
         v 
 My Projects 
         | 
         +--> Push 
         +--> Bulk Push 
         +--> Manage 
         +--> Log Time 
 ``` 

 The extension does not expose an unrestricted all-project picker to standard users. 

 ### 13.3 Administrator Behaviour 

 Administrators can work across projects and have additional project/user management functions where supported by Redmine. 

 The extension does not implement a separate application-level administrator database. 

 ### 13.4 Result Handling 

 A successful push displays information such as: 

 - issue number; 
 - issue URL; 
 - push timestamp; 
 - result status; 
 - warnings, when applicable. 

 Bulk mode displays each file's individual result. 

 ### 13.5 Local History 

 The History tab records push activity and allows local history entries to be removed. 

 Deleting extension history does not delete the Redmine issue. 

 History is reconciled against Redmine so an issue that no longer exists can be identified as no longer present in Redmine. 

 ### 13.6 Manage Workflow 

 The Manage tab provides Redmine-oriented operations including: 

 - project selection; 
 - project issue search/listing; 
 - issue inspection; 
 - issue update; 
 - issue download; 
 - project export; 
 - file attachment; 
 - project file management where permitted. 

 ### 13.7 Time Logging 

 Where the signed-in Redmine account can log time, the extension supports: 

 - project selection; 
 - issue/project target; 
 - activity selection; 
 - hours; 
 - spent-on date; 
 - comments. 

 ### 13.8 Assignment 

 Where Redmine permits it, the extension supports assigning users to projects and creating users through the administrator workflow. 

 --- 

 ## 14. Edge Cases & Error Handling 

 ### 14.1 Backend Unavailable 

 The extension reports that the backend cannot be reached instead of silently failing. 

 ### 14.2 Session Expired 

 Unauthorized responses trigger local session handling and return the user to the sign-in state. 

 ### 14.3 Invalid Backend URL 

 The login UI validates the backend address and reports invalid URLs. 

 ### 14.4 Insecure Remote HTTP 

 For non-local HTTP backend addresses, the extension warns that credentials would cross the network without encryption. 

 Shared-server deployments should use HTTPS. 

 ### 14.5 Permission Denied 

 The extension shows backend/Redmine permission errors and does not attempt to bypass Redmine authorization. 

 ### 14.6 Duplicate README/File 

 The extension shows the existing Redmine location and requires an explicit Push Anyway decision before forcing the duplicate. 

 ### 14.7 Missing Project 

 The push validation prevents submission until an appropriate project is selected. 

 ### 14.8 Missing Parent 

 Sub-task/update operations require an appropriate target issue. 

 ### 14.9 Invalid Dates 

 The extension validates the relationship between start and due dates. 

 ### 14.10 Bulk Failure 

 Bulk operations track per-file state: 

 ```text 
 created 
 skipped 
 failed 
 unsent 
 dry_run 
 sending 
 ``` 

 This allows individual failures to be identified and retried rather than treating the whole queue as an opaque transaction. 

 ### 14.11 Large README 

 If the Redmine description size is exceeded, the backend can fall back to a summary description while retaining the complete README as an attachment. 

 --- 

 ## 15. Configuration / Dependencies 

 ### Browser 

 - Google Chrome. 
 - Manifest V3 support. 
 - Minimum Chrome version: 110. 

 ### Backend 

 The extension requires the FastAPI backend to be running. 

 Development startup: 

 ```powershell 
 cd backend 
 python -m venv .venv 
 .\.venv\Scripts\Activate.ps1 
 pip install -r requirements.txt 
 python run.py check 
 python run.py 
 ``` 

 ### Extension Loading 

 ```text 
 Chrome 
   | 
   v 
 chrome://extensions 
   | 
   v 
 Developer Mode 
   | 
   v 
 Load unpacked 
   | 
   v 
 Select: 
 redmine-ai-automation/extension 
 ``` 

 ### Backend Address 

 Default development address: 

 ```text 
 http://localhost:8000 
 ``` 

 The extension can request optional origin permission for a remote backend address. 

 ### Redmine 

 The backend requires Redmine REST API access. 

 The extension signs the user in through the backend using the user's Redmine credentials. 

 ### Client-Side Storage 

 Chrome extension storage holds: 

 - backend URL; 
 - session metadata; 
 - account/capability metadata; 
 - last username; 
 - UI preferences; 
 - chat association preference; 
 - recent-minute setting; 
 - local dismissed-file state; 
 - theme preference. 

 The Redmine API key is not sent to or stored by the extension. 

 --- 

 ## 16. Testing & Verification 

 ### Verified Implementation Areas From the Supplied Project 

 The supplied source contains implementation for: 

 - Manifest V3 extension loading; 
 - login and session flow; 
 - permission-aware capability handling; 
 - README discovery; 
 - README preview; 
 - project suggestions; 
 - issue selection; 
 - new issue/sub-task/update modes; 
 - field autofill; 
 - dry-run preview; 
 - duplicate detection; 
 - companion-file handling; 
 - bulk push; 
 - history; 
 - Manage workflow; 
 - time logging; 
 - assignment workflow; 
 - theme switching; 
 - error handling. 

 ### Manual Verification Checklist 

 | # | Test | Expected Result | 
 |---|---|---| 
 | 1 | Load unpacked extension | Extension loads without manifest error | 
 | 2 | Start backend | Extension can reach backend | 
 | 3 | Sign in with valid Redmine account | Session established | 
 | 4 | Sign in with invalid credentials | Error shown; password cleared | 
 | 5 | Select README | README preview and metadata appear | 
 | 6 | Choose project | Project selection is reflected in summary | 
 | 7 | Choose New issue | Issue fields become available | 
 | 8 | Choose Sub-task | Parent issue selector appears | 
 | 9 | Choose Update | Existing issue selector is used | 
 | 10 | Change tracker/priority/assignee | User changes are retained | 
 | 11 | Preview | Validation occurs without final push | 
 | 12 | Push valid README | Redmine issue is created/updated | 
 | 13 | Push duplicate README | Duplicate warning is shown | 
 | 14 | Push Anyway | Explicit duplicate override is required | 
 | 15 | Attach companion file | File travels with story | 
 | 16 | Bulk validate | No Redmine writes occur | 
 | 17 | Bulk push | Individual result states are displayed | 
 | 18 | Remove history | Local history changes only | 
 | 19 | Log time | Redmine time entry is created when permitted | 
 | 20 | Standard user | Only allowed projects/actions are presented | 
 | 21 | Administrator | Administrative capabilities are presented | 
 | 22 | Session expiry | User is returned to sign-in | 
 | 23 | Dark mode | Theme preference is applied and remembered | 

 ### Testing Status Classification 

 The supplied project contains implementation and documentation for the above behaviours. This story does **not** claim a fresh execution of every test case unless an actual test result is separately recorded. 

 --- 

 ## 17. Current Status 

 **Implementation status: Implemented in the supplied Redmine README Sync v4 extension.** 

 The extension source contains the complete client-side workflow for README-based Redmine story creation plus the supporting management workflows. 

 The supplied implementation identifies the extension as: 

 ```text 
 Name: Redmine README Sync 
 Version: 4.0.0 
 Manifest: Manifest V3 
 Minimum Chrome: 110 
 ``` 

 The extension is designed to operate against the accompanying FastAPI backend and Redmine REST API. 

 --- 

 ## 18. Known Limitations 

 1. The extension itself does not generate README/story content. 
 2. The extension does not call an AI API. 
 3. The extension does not scrape chat pages. 
 4. The backend must be available for Redmine operations. 
 5. Redmine REST API must be enabled. 
 6. Shared-server deployments require HTTPS because Redmine credentials are submitted during sign-in. 
 7. A new-chat page without a stable conversation identifier cannot be associated with remembered chat state. 
 8. Redmine remains authoritative for final permission enforcement. 
 9. Large Redmine projects may use bounded duplicate-search behaviour rather than an unlimited issue scan. 
 10. Fresh end-to-end execution of every documented test case is not claimed by this story unless separately recorded. 

 --- 

 ## 19. Decisions & Important Design Notes 

 ### 19.1 No AI Inside the Extension 

 The extension was intentionally separated from AI generation. 

 ```text 
 AI / Claude Skill 
        | 
        v 
 README.md 
        | 
        v 
 Extension 
        | 
        v 
 Redmine 
 ``` 

 This prevents the extension from being coupled to a particular AI website or API. 

 ### 19.2 No Chat Content Scraping 

 Only the active tab URL/title can be used for optional chat association. 

 The extension does not inject scripts into Claude or other chat websites. 

 ### 19.3 Redmine Is the Permission Authority 

 Application-level capability visibility improves UX, but Redmine remains the enforcement layer. 

 ### 19.4 Explicit Duplicate Override 

 Duplicate content is not silently pushed. 

 The user must explicitly choose the override path. 

 ### 19.5 User-Controlled Project Selection 

 For standard users, project selection is limited to assigned projects. 

 ### 19.6 Dry Run Before Write 

 The extension provides a preview/validation stage before the actual Redmine write operation. 

 ### 19.7 Stable Story Identity 

 The README-generation skill supplies stable `story_key` metadata so repeated generation of the same logical story can be mapped back to the same Redmine work item rather than being treated as a completely new story. 

 --- 

 ## 20. Future Enhancements / Next Steps 

 Only items supported by the existing project direction are listed here: 

 - Continue extending Redmine-native management capabilities as required. 
 - Maintain compatibility between README front matter and extension autofill logic. 
 - Expand automated browser-level regression coverage for the extension UI. 
 - Continue validating bulk push and duplicate workflows against representative Redmine datasets. 
 - Maintain compatibility with future Redmine API/configuration changes. 
 - Continue improving deployment and operational diagnostics for shared-server installations. 

 --- 

 ## 21. Final Outcome 

 The extension provides a complete user-facing bridge between generated Markdown project documentation and Redmine story management. 

 The resulting workflow is: 

 ```text 
 ┌───────────────────────────┐ 
 │ Project / AI Conversation │ 
 └─────────────┬─────────────┘ 
               │ 
               v 
 ┌───────────────────────────┐ 
 │ README / Story Generation │ 
 │ Claude Skill / Other Tool │ 
 └─────────────┬─────────────┘ 
               │ 
               v 
 ┌───────────────────────────┐ 
 │ Chrome Extension            │ 
 │                             │ 
 │ 1. Select README            │ 
 │ 2. Select Project           │ 
 │ 3. Select Issue Operation │ 
 │ 4. Review Fields            │ 
 │ 5. Preview                  │ 
 │ 6. Push                     │ 
 └─────────────┬─────────────┘ 
               │ 
               v 
 ┌───────────────────────────┐ 
 │ FastAPI Backend             │ 
 │ Session + Validation        │ 
 │ Redmine API Client          │ 
 └─────────────┬─────────────┘ 
               │ 
               v 
 ┌───────────────────────────┐ 
 │ Redmine                     │ 
 │                             │ 
 │ Issue / Sub-task / Update │ 
 │ + README + Attachments      │ 
 └───────────────────────────┘ 
 ``` 

 The extension therefore turns the README produced by the project-documentation workflow into an actionable Redmine story while keeping story generation, browser UI, backend security, and Redmine authorization as separate responsibilities. 

 --- 

 ## 22. Reference / Execution Information 

 ### Project 

 ```text 
 redmine-ai-automation 
 ``` 

 ### Extension Location 

 ```text 
 redmine-ai-automation/extension/ 
 ``` 

 ### Important Source Files 

 ```text 
 extension/manifest.json 
 extension/popup.html 
 extension/popup.js 
 extension/popup.css 
 extension/api.js 
 extension/login.js 
 extension/state.js 
 extension/bulk.js 
 extension/ui.js 
 extension/theme.js 
 extension/theme-init.js 
 ``` 

 ### Backend Dependency 

 ```text 
 redmine-ai-automation/backend/ 
 ``` 

 ### Key Backend APIs Used for Story Creation 

 ```text 
 POST /auth/login 
 GET    /auth/me 
 GET    /files 
 GET    /files/{id} 
 GET    /suggest 
 GET    /projects 
 GET    /trackers 
 GET    /priorities 
 GET    /projects/{id}/meta 
 GET    /issues 
 POST /push 
 POST /push/bulk 
 GET    /history 
 ``` 

 ### Setup Reference 

 ```text 
 1. Create and activate the Python virtual environment. 
 2. Install backend requirements. 
 3. Configure backend/config.yaml. 
 4. Run: python run.py check 
 5. Run: python run.py 
 6. Open chrome://extensions. 
 7. Enable Developer Mode. 
 8. Select Load unpacked. 
 9. Select the framework's extension folder. 
 10. Ensure Redmine is running. 
 11. Sign in through the extension using the Redmine account. 
 ``` 

 ### Source Basis 

 This story was prepared from the supplied `redmine-ai-automation` framework, its extension source, backend API contract, project documentation, the supplied Redmine setup guideline, and the previously established project requirements. 

 The implementation should be treated as the authoritative source for what is actually present in the supplied framework; planned or unverified behaviour is explicitly identified rather than presented as a completed test result. 

Back