Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@

- Make code changes on `mv2` first.
- `main` is the real MV3 branch.
- `mv3` is retired. Do not use it as the normal MV3 source branch for new work or cross-repo sync.
- `mv3` and `mv3-ltl` are retired. Do not use them as MV3 source branches for new work or cross-repo sync; `main` is the MV3 line LiveTL consumes.
- Do not implement feature/fix work directly on `main`.
- If a task starts on another branch, switch to `mv2` before editing unless the user explicitly asks otherwise.
- If a task touches both HyperChat and LiveTL, HyperChat still goes first.
- Cross-repo order is mandatory:
1. HyperChat `mv2`
2. HyperChat `main`
3. HyperChat `mv3-ltl`
4. LiveTL `develop`
5. LiveTL `mv3-fr`
6. LiveTL `release`
3. LiveTL `develop`
4. LiveTL `mv3-fr`
5. LiveTL `release`
- Never start cross-repo work in LiveTL when the HyperChat submodule also needs to change.
- If the task also requires syncing YtcFilter (YTCF), do it after HyperChat `main` is updated:
- merge HyperChat `main` into YTCF `master`
Expand All @@ -29,16 +28,14 @@
- `order matters`
- Avoid padded scopes, issue-number prefixes, and changelog-style essays in commit subjects.
- A slightly dry or funny commit is fine if it is still clear at a glance.
- Prefer proper merges when carrying `mv2` work into `main` and `mv3-ltl`.
- Carry `main` into `mv3-ltl`. Do not treat `mv3` as the normal hop between them.
- Prefer proper merges when carrying `mv2` work into `main`.
- If MV3 needs follow-up adaptation, keep that as a small, explicit commit after the merge instead of rewriting history or hand-copying changes.

## Code Patterns

- Prefer editing existing modules and utilities over creating one-off files for tiny helpers.
- If a helper obviously belongs in an existing shared utility file, put it there.
- Put shared behavior on `mv2` first; `main` and `mv3-ltl` should usually be merge-plus-adaptation branches, not separate feature branches.
- Keep `mv3-ltl` branching from the current `main` line once `main` has the intended HC changes.
- Put shared behavior on `mv2` first; `main` should usually be a merge-plus-adaptation branch, not a separate feature branch.
- Keep MV3 adaptation narrow:
- preserve branch-specific build/runtime wiring
- change only what is required for manifest/background/injection differences
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ VERSION=X.Y.Z npm run build:firefox # just Firefox
```

The built ZIP files can be found in the `build` directory.

## Release

Release steps for `mv2` and `main` are documented in [RELEASE_PROCESS.md](./RELEASE_PROCESS.md).
7 changes: 3 additions & 4 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ This repo ships from two active lines that serve different purposes.
2. Commit and push on `mv2`.
3. Merge `mv2` into `main`.
4. Validate and push `main`.
5. If LiveTL needs the MV3-tailored HC line, merge `main` into `mv3-ltl`.
6. Create releases from each branch that actually ships.
5. Create releases from each branch that actually ships.

`mv3` is historical. Do not route normal maintenance through `mv3` unless the user explicitly asks for branch archaeology.
`main` is the MV3 line LiveTL consumes. `mv3` and `mv3-ltl` are historical. Do not route normal maintenance through them unless the user explicitly asks for branch archaeology.

If the same task also affects LiveTL, do not begin in LiveTL. Finish this HyperChat ladder first, then bump the LiveTL submodule chain in this order:

Expand Down Expand Up @@ -74,4 +73,4 @@ Practical rule for `main`: bump `package.json`, commit it, then create/publish t

## Notes For LiveTL Sync

LiveTL consumes HyperChat via submodules. Keep HyperChat changes branch-aligned across `mv2`, `main`, and `mv3-ltl` so LiveTL can take them with straightforward submodule bumps in its release flow.
LiveTL consumes HyperChat via submodules. Keep HyperChat changes branch-aligned across `mv2` and `main` so LiveTL can take them with straightforward submodule bumps in its release flow. LiveTL's MV2 Firefox variant tracks `mv2`; its MV3 line tracks `main`.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"build:firefox": "cross-env BROWSER=firefox vite build",
"dev:chrome": "cross-env MINIFY=false BROWSER=chrome vite build --watch",
"dev:firefox": "cross-env MINIFY=false BROWSER=firefox vite build --watch",
"start": "npm run dev:chrome",
"start:none": "npm run dev:chrome",
"start:chrome": "cross-env AUTOLAUNCH=true npm run dev:chrome",
"start:firefox": "cross-env AUTOLAUNCH=true npm run dev:firefox",
"lint": "npm run lint:check -- --fix",
Expand Down
1 change: 1 addition & 0 deletions src/components/Message.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
} from '../ts/storage';
import { chatUserActionsItems, ChatUserActions, Theme } from '../ts/chat-constants';
import { useBanHammer } from '../ts/chat-actions';
import type { Chat } from '../ts/typings/chat';
import { formatAuthorName } from '../ts/component-utils';
import { mdiGift, mdiReply } from '@mdi/js';

Expand Down
1 change: 0 additions & 1 deletion src/components/MessageRuns.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { Theme, YoutubeEmojiRenderMode } from '../ts/chat-constants';

import TranslatedMessage from './TranslatedMessage.svelte';
import {
emojiRenderMode, useSystemEmojis
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/chat-injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ensureLiveTLTranslatorHost = (): void => {

const script = document.createElement('script');
script.id = 'hc-ltl-translator-host';
script.src = chrome.runtime.getURL('chat-translation-host.bundle.js');
script.src = getScriptURL('chat-translation-host.js');
script.onload = () => script.remove();
script.onerror = () => script.remove();
(document.head ?? document.documentElement).appendChild(script);
Expand Down
25 changes: 20 additions & 5 deletions src/ts/typings/ytc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ declare namespace Ytc {
targetActionId: string;
};
addLiveChatTickerItemAction?: AddTickerAction;
updateLiveChatPollAction?: {
pollToUpdate: {
pollRenderer: PollRenderer;
};
};
updateLiveChatPollAction?: UpdatePollAction;
}

/** Expected YTC action object */
Expand Down Expand Up @@ -178,6 +174,12 @@ declare namespace Ytc {
accessibility?: AccessibilityObj;
}

interface UpdatePollAction {
pollToUpdate: {
pollRenderer: PollRenderer;
};
}

/** Message run object */
interface MessageRun {
text?: string;
Expand Down Expand Up @@ -308,6 +310,19 @@ declare namespace Ytc {
};
}

interface EngagementMessageRenderer {
message: RunsObj[];
id: string;
timestampUsec?: IntString;
icon?: {
/** Unlocalized string */
iconType: string;
};
actionButton?: {
buttonRenderer: ButtonRenderer;
}
}

interface ChatSummaryRenderer {
liveChatSummaryId: string;
chatSummary: RunsObj;
Expand Down
Loading