Feature:Chat

From Kosmos Wiki
Revision as of 18:16, 11 June 2015 by Raucao (talk | contribs)
Jump to navigation Jump to search

Summary

Kosmos's chat functionality is initially based on the IRC protocol (used via Sockethub), but enhances it with input/output app components, which enable rich-snippet rendering and other features. Let's call these components satellites, for lack of a better codename atm. (Feel free to brainstorm names on this wiki page. Would be great to have sth where people say "dude, just write a [perfectname] for Kosmos". Kind of like DuckDuckGo "spices" for example.)

Chat is the main user interface for channels, which act as the scopes for other features, like e.g. File sharing, as well.

Features

Satellites

Name Description
Code Snippet When pasting a multi-line text, it offers to convert it into a rendered, potentially code-highlighted rich snippet
Map When pasting geo coordinates, or a maps URL (e.g. GMaps or OSM), it renders a small map with a pin and possibly popup on click, as well as a link to a big version of the map in a new window/tab/app
Incoming notification Every incoming notification (e.g. a Travis build) is given a notification type (hardcoded), which in turn is associated with a rich-snippet template and data.
Channel link When a #channelname is detected, it renders a link to that channel. Even better, if the user is using channels with the same name in multiple spaces, it should open a menu to select which one to open.
Time zones When other users are using different time zones, show their local time as well. Either next to the normal timestamp, or highlight the timestamp to indicate that it's not the other person's time zone and show their time on hover or similar.
Username mention When a person's own username is detected in another person's message, it is highlighted and a notification is triggered, if the app is not in the foreground (optionally with audio sound).
Word-list mention Same as username mentions, but not enabled by default (i.e. empty word list in the beginning). Users can configure their own word list per channel.
Image When an image URL is detected, it renders the image inline (either inline, if nothing else surrounds the url, or as a second line)
Tweet When a link to a tweet is detected, the tweet is fetched an rendered with a rich snippet in a new line
GitHub/Bitbucket When pasting a link to a Github repository, it renders the basic information about that repository (name, description, language, ...).
Website link When a generic URL is detected (and not handled by another satellite), it tries to fetch the title of the linked Web page or document and add that as a second line
Emoji When emoji syntax is detected, it renders an emoji image. When starting to type emoji syntax, it shows an auto-complete menu, similar to GitHub comment form fields.
Voting "Everyone in favor of [x]?" triggers a yes/not poll. Responding with +1 or -1 (or using the vote input that then writes a +1 for you) counts up votes in a widget that stays in view until the poll is closed. If the majority hasn't responded in x amount of time, it sends them reminders to vote.
Correct/replace previous line When an s/word/word pattern is detected, it applies the replacement to the previous line of that user (only as rendering in the Web UI). A discreet highlighting is added to the word to indicate it was replaced, and when hovering (or similar), you can see the details of the replacement.

Hint: all of this is backwards-compatible to plain IRC, meaning that if something is too long or for other reasons not possible to render nicely in a line of chat, it needs to be posted somewhere and linked to. The Web Client can fetch extra information from that resource, while the plain chat can use minimal messages that don't pollute the UI for plain-old-IRC-client users (let's call these programs POICs from now on. :))

Offline notifications for mentions

When you're not connected to 67P on any device, it will send notifications for username mentions in channels. Configurable methods:

  • Email — Sent by Sockethub. Could even use the actual person's email address and SMTP account for sending a direct email person-to-person with the message content.
  • W3C Push API / Service workers — As soon as possible
  • None (maybe "weekend mode" or sth)

Channel logs / history replay

Channel logs live in either the user's personal remote storage (for personal usage on public servers), or in the organization's common remote storage. A Sockethub butler daemon will publish the logs to the storage servers, while they can be retrieved from the Web Client (for replay) directly via remoteStorage.js. Also, the Web client may want to publish/read read-status for messages/message ranges to/from the storage.

NickServ integration

This should belong to the setup flow/UX for public channels, in case the server has NickServ running.

When starting the app/prototype for the first time and/or setting up a public subspace/server, 67P will guide you through the process of either creating a reserved username or configuring an existing one.

Most of this could actually be a satellite, being triggered by NickServ messages and writing the right ones back. It might make sense to make storing the password optional.

Easy joining of public channels as entry point to becoming a user

See e.g. something like https://github.com/rauchg/slackin (love the badge, too) or the various Web IRC programs, of course.

Create channels on the fly

As opposed to having to create new channels before being able to join them, it's possible to just join channels on the fly via the normal syntax and then configure them once you're in it. IRC got that right, but not possible on e.g. Grove. On pro, that needs to be limited to admins optionally (but maybe not in the first version).

Feature ideas for later™

  • Send-later for messages (e.g. wait until business hours with sending sth)
  • Big-screen mode/view. Can show activity in multiple/all/selected channels at once.
  • History replay for normal IRC clients; could include a link to open complete history in browser (like Grove does)
  • Real-time translation to user's language (with hover-to-see-source or sth)
  • Make channels linkable, even when they're on different networks (maybe needs a satellite for both input and display)
  • Team mentions