Skip to content

Conversation

@Mubelotix
Copy link
Owner

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds a comprehensive settings system to the SimRepo browser extension, replacing the placeholder options page with a fully functional YAML-based configuration editor powered by CodeMirror.

Key Changes:

  • Implements a YAML editor with schema validation for configuring extension features
  • Adds configurable options for similar repository recommendations and homepage features
  • Updates API endpoint URL and improves content script URL change detection

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
source/options.js Complete rewrite implementing CodeMirror YAML editor with auto-save, schema validation, and default configuration generation
source/options.html Simplified HTML structure to host the CodeMirror editor with minimal custom styling
source/options.css Removed entirely as styling is now handled by CodeMirror and inline styles
source/options-storage.js Updated default options to include settings for similar repos and homepage recommendations
source/content.js Enhanced URL change detection to use pathname instead of full href, added /feed route handling
source/content-stars.js Integrated options to control homepage recommendations including enabling/disabling, count limits, and randomization
source/content-repo.js Added options support for similar repositories feature including private repo handling and customizable display count
source/background.js Updated API endpoint URL to new domain
package.json Added CodeMirror, YAML, and related dependencies for the new editor
package-lock.json Locked dependency versions for all new packages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Mubelotix Mubelotix reopened this Nov 20, 2025
@Mubelotix Mubelotix requested a review from Copilot November 21, 2025 09:22
@Mubelotix Mubelotix merged commit 11ddef7 into stable Nov 21, 2025
10 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 19 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +173 to +174
} catch (e) {
console.error("YAML parse error — not saving:", e.message);
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message logs the exception message but doesn't provide any feedback to the user about parse errors. Consider displaying parse errors in the UI so users know when their YAML is invalid and why saving failed.

Copilot uses AI. Check for mistakes.
import octicons from "@primer/octicons";
import GH_LANG_COLORS from 'gh-lang-colors';
import { formatNumber, getSimilarRepos, loadingSpinner } from './common.js';
import { formatNumber, getSimilarRepos, loadingSpinner, setupSettingsListener } from './common.js';
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the import statement. All other imports in this file end with semicolons for consistency.

Copilot uses AI. Check for mistakes.
import octicons from "@primer/octicons";
import { getSimilarRepos, formatNumber, loadingSpinner } from './common.js';
import { getSimilarRepos, formatNumber, loadingSpinner, setupSettingsListener } from './common.js';
import { optionsStorage } from './options-storage.js';
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the import statement for consistency with other statements in the file.

Copilot uses AI. Check for mistakes.
import { basicSetup } from "codemirror"
import { EditorView, keymap } from "@codemirror/view"
import { yaml } from "@codemirror/lang-yaml"
import { yamlSchema } from 'codemirror-json-schema/yaml';
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at the end of the import statement. All other imports in this file end with semicolons for consistency.

Copilot uses AI. Check for mistakes.
required: [],
};

let editor = document.getElementById('editor');
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the variable declaration for consistency with other statements in the file.

Copilot uses AI. Check for mistakes.
}
}

var view = null;
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the variable declaration for consistency with other statements in the file.

Copilot uses AI. Check for mistakes.
import { getSimilarRepos, formatNumber, loadingSpinner, setupSettingsListener } from './common.js';
import { optionsStorage } from './options-storage.js';

var loading = false;
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the variable declaration for consistency with other statements in the file.

Copilot uses AI. Check for mistakes.
@@ -1,8 +1,8 @@
import { initCache } from './cache.js';

Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the import statement for consistency with other statements in the file.

Copilot uses AI. Check for mistakes.
import 'webext-base-css';
import './options.css';
import { optionsStorage } from './options-storage.js';
import { basicSetup } from "codemirror"
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at the end of the import statement. All other imports in this file end with semicolons for consistency.

Suggested change
import { basicSetup } from "codemirror"
import { basicSetup } from "codemirror";

Copilot uses AI. Check for mistakes.
});

let changed = false;
let saveTimeout = null;
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the variable declaration for consistency with other statements in the file.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants