Julien Simon Claude Opus 4.6 commited on
Commit
7c11600
·
1 Parent(s): be3212f

Remove .env from Docker image, replace copy button with save

Browse files

- Remove COPY .env from Dockerfile and add .env to .dockerignore
so secrets are injected at runtime instead of baked into the image
- Replace clipboard copy with file download (Save button) that
exports the review as a named .md file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (3) hide show
  1. .dockerignore +1 -1
  2. public/app.js +15 -7
  3. public/index.html +1 -1
.dockerignore CHANGED
@@ -1,5 +1,5 @@
1
  node_modules/
2
- .env*
3
  .git/
4
  .claude/
5
  .DS_Store
 
 
1
  node_modules/
 
2
  .git/
3
  .claude/
4
  .DS_Store
5
+ .env
public/app.js CHANGED
@@ -312,14 +312,22 @@ function buildMarkdownExport() {
312
  return output.trim();
313
  }
314
 
315
- copyBtn.addEventListener("click", async () => {
316
  const markdown = buildMarkdownExport();
317
- try {
318
- await navigator.clipboard.writeText(markdown);
319
- showToast();
320
- } catch (err) {
321
- console.error("Copy failed:", err);
322
- }
 
 
 
 
 
 
 
 
323
  });
324
 
325
  function showToast() {
 
312
  return output.trim();
313
  }
314
 
315
+ saveBtn.addEventListener("click", () => {
316
  const markdown = buildMarkdownExport();
317
+ const filename = `${metaRepo.textContent.replace(/\//g, '-')}-${metaPath.textContent.split('/').pop()}-${brutalityLevel}.md`;
318
+
319
+ const blob = new Blob([markdown], { type: 'text/markdown' });
320
+ const url = URL.createObjectURL(blob);
321
+
322
+ const a = document.createElement('a');
323
+ a.href = url;
324
+ a.download = filename;
325
+ document.body.appendChild(a);
326
+ a.click();
327
+ document.body.removeChild(a);
328
+ URL.revokeObjectURL(url);
329
+
330
+ showToast();
331
  });
332
 
333
  function showToast() {
public/index.html CHANGED
@@ -268,7 +268,7 @@
268
  <button class="tab" data-section="security">Security</button>
269
  <button class="tab" data-section="suggestions">Suggestions</button>
270
  <button class="tab" data-section="verdicts">Verdicts</button>
271
- <button type="button" id="copy-btn" hidden>Copy Review</button>
272
  </nav>
273
  <div id="tab-content" class="tab-content"></div>
274
  </div>
 
268
  <button class="tab" data-section="security">Security</button>
269
  <button class="tab" data-section="suggestions">Suggestions</button>
270
  <button class="tab" data-section="verdicts">Verdicts</button>
271
+ <button type="button" id="save-btn" hidden>Save</button>
272
  </nav>
273
  <div id="tab-content" class="tab-content"></div>
274
  </div>